comparison tests/parseInt.ur @ 1630:4798ad652c94

Stop [read] from raising an exception for invalid [int] strings
author Adam Chlipala <adam@chlipala.net>
date Sun, 04 Dec 2011 15:13:53 -0500
parents
children
comparison
equal deleted inserted replaced
1629:438561303d02 1630:4798ad652c94
1 fun main () : transaction page =
2 s <- source "";
3 return <xml><body>
4 <ctextbox source={s}/>
5 <button onclick={n <- get s;
6 case read n of
7 None => alert "Invalid"
8 | Some n => alert (show (n + 1))}/>
9 </body></xml>