sml if else statements
if, then and else are the keywords. then is required after the if.
[code language=”text”]
if 3+3=5 then "Wrong"
else "3+3 is not 5";
[/code]
Output:
[code language=”text”]
val it = "3+3 is not 5" : string
val it = () : unit
[/code]
Search within Codexpedia

Custom Search
Search the entire web

Custom Search
Related Posts