Non-decimal radices/Output: Difference between revisions
→{{header|Wren}}: No need to use Str.upper in fact.
(Added Wren) |
(→{{header|Wren}}: No need to use Str.upper in fact.) |
||
Line 1,719:
{{libheader|fmt}}
Wren has no non-decimal number conversions in its standard library so this uses a module I wrote myself to reproduce the Haskell table.
<lang ecmascript>import "/fmt" for
System.print(" 2 7 8 10 12 16 32")
Line 1,728:
var b8 = Fmt.o(4, i)
var b10 = Fmt.d(4, i)
var b12 = Fmt.s(4,
var b16 = Fmt.X(4, i)
var b32 = Fmt.s(4,
System.print("%(b2) %(b7) %(b8) %(b10) %(b12) %(b16) %(b32)")
}</lang>
|