Literals/Integer: Difference between revisions
Content deleted Content added
re-order |
added standard ml |
||
Line 381: | Line 381: | ||
#t |
#t |
||
</pre> |
</pre> |
||
=={{header|Standard ML}}== |
|||
(This is an interactive SML/NJ session) |
|||
Hex(leading 0x), Word (unsigned ints, leading 0w), Word Hex (leading 0wx) |
|||
<lang sml> |
|||
- 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 |
|||
</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |