1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-31 07:08:06 +11:00
collapseos/blk/005

17 lines
429 B
Plaintext
Raw Normal View History

2020-05-23 10:39:28 +10:00
Number literals
2020-06-10 12:55:42 +10:00
Traditional Forth often uses HEX/DEC switches to go from deci-
mal to hexadecimal parsing. Collapse OS parses literals in a
way that is closer to C.
2020-05-23 10:39:28 +10:00
Straight numbers are decimals, numbers starting with "0x"
are hexadecimals (example "0x12ef"), "0b" prefixes indicate
binary (example "0b1010"), char literals are single characters
surrounded by ' (example 'X'). Char literals can't be used for
whitespaces.