oso[0][cs171] > sml Standard ML of New Jersey, Version 109.27, April 20, 1997 - - if 4>3 then 2.0 else 1.3; val it = 2.0 : real - - if 4<3 then 2.0 else 1.3; val it = 1.3 : real - - if 4+3 then 2.0 else 1.3; stdIn:12.1-12.25 Error: case object and rules don't agree [literal] rule domain: bool object: int in expression: (case + : overloaded ((4 : int),(3 : int)) of true => 2.0 | false => 1.3) - - if 4>3 then 2.0 else 3^H else 1.3; stdIn:13.1-13.23 Error: types of rules don't agree [literal] earlier rule(s): bool -> int this rule: bool -> real in rule: false => 1.3 - - if 4 >= 3 andalso "hello" < "world" then "ok" else "no way"; val it = "ok" : string - - GC #0.0.0.0.1.8: (0 ms) - - if 4 < 3 orelse 1.2+3.0 > 4.1 then 3+4 else 5*2+4; val it = 7 : int - - 3+4.5; stdIn:19.1-19.6 Error: operator and operand don't agree [literal] operator domain: int * int operand: int * real in expression: + : overloaded ((3 : int),4.5) - - real(3)+4.5; val it = 7.5 : real - - 3+floor(4.5); val it = 7 : int - - floor(~4.5); val it = ~5 : int - - ceil(4.5); val it = 5 : int - - ceil(~4.5); val it = ~4 : int - - trunc(4.5); val it = 4 : int - - trunc(~4.5); val it = ~4 : int - - chr(74); val it = #"J" : char - - ord(#"F"); val it = 70 : int - - ord(#"f"); val it = 102 : int - - (* this is a comment *) -