diff tests/jscomp.ur @ 971:c22e524a6dd3

Basic arithmetic working with interpretation
author Adam Chlipala <adamc@hcoop.net>
date Tue, 22 Sep 2009 13:23:27 -0400
parents
children 733f67bb64e7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/jscomp.ur	Tue Sep 22 13:23:27 2009 -0400
@@ -0,0 +1,10 @@
+fun main () =
+    s <- source "";
+
+    return <xml><body>
+      <ctextbox source={s}/><br/>
+
+      <button value="Echo" onclick={s <- get s; alert s}/>
+      <button value="+1" onclick={s <- get s; alert (show (readError s + 1))}/>
+      <button value="*3" onclick={s <- get s; alert (show ((readError s) * 3))}/>
+    </body></xml>