view tests/fromString.ur @ 288:4260ad920c36

Converting string to int
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 11:33:13 -0400
parents
children 0cc956a3216f
line wrap: on
line source
fun i2s s =
        case stringToInt s of
          None => 0
        | Some n => n

fun main () : transaction page = return <html><body>
        Error = {cdata (show _ (i2s "Error"))}<br/>
        3 = {cdata (show _ (i2s "+3"))}<br/>
</body></html>