Non-decimal radices/Output: Difference between revisions

Content added Content deleted
No edit summary
(add RPL)
Line 1,712: Line 1,712:
ABCD
ABCD
FFFFFFFF
FFFFFFFF
</pre>

=={{header|RPL}}==
Unsigned integers are displayed in binary, octal, decimal or hexadecimal base depending on the state of 2 user flags, which can be easily configured by using resp. the <code>BIN</code>, <code>OCT</code>, <code>DEC</code> or <code>HEX</code> instruction. It is not possible to display several numbers in different bases simultaneously, unless you "freeze" their appearance by converting them to a string:
#314 DUP BIN →STR " " +
OVER OCT →STR + " " +
OVER DEC →STR + " " +
OVER HEX →STR +
{{out}}
<pre>
1: "# 100111010b # 472o # 314d # 13Ah"
</pre>
</pre>