view 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 source
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>