adamc@289: fun s2i s = adamc@290: case read _ s of adamc@288: None => 0 adamc@288: | Some n => n adamc@288: adamc@289: fun s2f s = adamc@290: case read _ s of adamc@289: None => 0.0 adamc@289: | Some n => n adamc@289: adamc@291: fun s2s s = adamc@291: case read _ s of adamc@291: None => "Error" adamc@291: | Some s => s adamc@291: adamc@289: fun s2b s = adamc@290: case read _ s of adamc@289: None => False adamc@289: | Some b => b adamc@289: adamc@288: fun main () : transaction page = return adamc@289: Error = {cdata (show _ (s2i "Error"))}
adamc@289: 3 = {cdata (show _ (s2i "+3"))}
adamc@289:
adamc@289: Error = {cdata (show _ (s2f "Error"))}
adamc@289: 98.76 = {cdata (show _ (s2f "98.76"))}
adamc@289:
adamc@289: Error = {cdata (show _ (s2b "Error"))}
adamc@289: False = {cdata (show _ (s2b "false"))}
adamc@289: True = {cdata (show _ (s2b "trUE"))}
adamc@291:
adamc@291: Hi = {cdata (s2s "Hi")}
adamc@288: