diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:33:13 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:33:13 -0400 |
commit | 5cf1d4d086475575a31f57413c57c22bd6fda378 (patch) | |
tree | ab36ce67d2931f2c715b5b734930139c53adc670 /tests/fromString.ur | |
parent | 42c284b9204ef5dfc249cc7273ff2eaa9304e9e6 (diff) |
Converting string to int
Diffstat (limited to 'tests/fromString.ur')
-rw-r--r-- | tests/fromString.ur | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/fromString.ur b/tests/fromString.ur new file mode 100644 index 00000000..d9a087e4 --- /dev/null +++ b/tests/fromString.ur @@ -0,0 +1,10 @@ +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> + |