ss@arovane % sml ~ Standard ML of New Jersey v110.52 [built: Fri Jan 21 16:42:10 2005] - (* exercise 2.1.1 *) - 1+2*3; val it = 7 : int - 5.0-4.2/1.4; val it = 2.0 : real - 11 div 2 mod 3; val it = 2 : int - "foo"^"bar"^""; val it = "foobar" : string - 3>4 orelse 5<6 andalso not (7<>8); val it = false : bool - if 6<10 then 6.0 else 10.0; val it = 6.0 : real - 0XAB+123; stdIn:8.2-8.5 Error: unbound variable or constructor: XAB stdIn:8.1-8.9 Error: operator is not a function [literal] operator: int in expression: 0 - 0xab<123; val it = false : bool - (* exercise 2.1.2 *) - 8/4; stdIn:10.2 Error: overloaded variable not defined at type symbol: / type: int - if 2<3 then 4; = ; = Interrupt - 1<2 and 5>3; stdIn:1.5 Error: syntax error found at AND - 6+7 DIV 2; stdIn:1.5-1.8 Error: unbound variable or constructor: DIV stdIn:1.1-1.10 Error: operator is not a function [literal] operator: int in expression: 7 - 4. +3.5; stdIn:1.2 Error: syntax error found at DOT - 1.0<2.0 or 3>4; stdIn:1.9-1.11 Error: unbound variable or constructor: or stdIn:1.1-9.5 Error: operator is not a function [tycon mismatch] operator: real in expression: 2.0 stdIn:1.1-9.5 Error: operator and operand don't agree [literal] operator domain: bool * bool operand: bool * int in expression: 1.0 < (2.0 ) 3 > 4 stdIn:9.3 Error: overloaded variable not defined at type symbol: > type: bool - #"a"^#"b"; stdIn:1.5-1.7 Error: unbound variable or constructor: ^# stdIn:1.1-1.10 Error: operator is not a function [tycon mismatch] operator: char in expression: #"a" - 123.; = Interrupt - 1.0 = 2.0; stdIn:1.1-13.4 Error: operator and operand don't agree [equality type required] operator domain: ''Z * ''Z operand: real * real in expression: 1.0 = 2.0 -