Non-decimal radices/Convert: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: Generalising to allow for variant digit sets, such as upper case vs lower case Hexadecimal) |
m (→{{header|Haskell}}: (adjusted the example)) |
||
Line 1,293: | Line 1,293: | ||
inOctal :: Int -> String |
inOctal :: Int -> String |
||
inOctal = inBaseDigits "01234567" |
inOctal = inBaseDigits "01234567" |
||
main :: IO () |
main :: IO () |
||
main = |
|||
mapM_ putStrLn $ [inLowerHex, inUpperHex, inBinary, inOctal] <*> [254]</lang> |
|||
{{Out}} |
{{Out}} |
||
<pre> |
<pre>fe |
||
FE |
|||
FF |
|||
11111110 |
|||
11111111 |
|||
376</pre> |
|||
=={{header|HicEst}}== |
=={{header|HicEst}}== |