Non-decimal radices/Output: Difference between revisions
Content added Content deleted
(Added Algol W) |
|||
Line 119: | Line 119: | ||
000032 000020 000040 |
000032 000020 000040 |
||
000033 000021 000041 |
000033 000021 000041 |
||
</pre> |
|||
=={{header|ALGOL W}}== |
|||
Algol W has a standard procedure intbase16 that returns its parameter converted to a string in hexadecimal. |
|||
<lang algolw>begin |
|||
% print some numbers in hex % |
|||
for i := 0 until 20 do write( intbase16( i ) ) |
|||
end.</lang> |
|||
{{out}} |
|||
<pre> |
|||
00000000 |
|||
00000001 |
|||
00000002 |
|||
00000003 |
|||
00000004 |
|||
00000005 |
|||
00000006 |
|||
00000007 |
|||
00000008 |
|||
00000009 |
|||
0000000A |
|||
0000000B |
|||
0000000C |
|||
0000000D |
|||
0000000E |
|||
0000000F |
|||
00000010 |
|||
00000011 |
|||
00000012 |
|||
00000013 |
|||
00000014 |
|||
</pre> |
</pre> |
||