Anonymous user
Non-decimal radices/Convert: Difference between revisions
→{{header|Forth}}: bug
(→{{header|Forth}}: fix comments) |
(→{{header|Forth}}: bug) |
||
Line 163:
=={{header|Forth}}==
Forth has a global user variable, BASE, which determines the radix used for parsing, interpretation, and printing of integers. This can handle bases from 2-36, but there are two words to switch to the most popular bases, DECIMAL and HEX.
42 dup
2 base !
. \ 101010
|