RosettaCodeData/Task/Literals-Integer/Standard-ML/literals-integer.ml
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

11 lines
318 B
OCaml

- 727 = 0x2d7;
val it = true : bool
- 727 = Word.toInt 0w727;
val it = true : bool
- 0w727 = 0wx2d7;
val it = true : bool
- ~727; (* negative number;
* ~ is the unary negation operator for all numbers, including reals and ints;
* worth mentioning because it's unusual
*)
val it = ~727 : int