Non-decimal radices/Convert: Difference between revisions

m
m (→‎{{header|Phix}}: added builtin handling notes)
Line 2,359:
?to_number("1a",{},16) -- displays 26</lang>
The following more generic routines can handle all other conversions, in bases 2 to 36. <br>
Note you are expected to strip any leading "#" or "0x" from hexadecimal input strings (etc) manually, and (as-is) only use a-z not A-Z.
<lang Phix>-- demo\rosetta\Convert_base.exw
function to_base(integer i, integer base)
7,818

edits