mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-14 14:58:05 +11:00
f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
429 B
Plaintext
17 lines
429 B
Plaintext
Number literals
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|