Non-decimal radices/Convert: Difference between revisions

m
→‎{{header|REXX}}: change LANG html tag to PRE (for handling boxed comments).
m (→‎{{header|REXX}}: added option for the LANG html tag.)
m (→‎{{header|REXX}}: change LANG html tag to PRE (for handling boxed comments).)
Line 1,801:
<br>This routine was ripped out from a bigger version of mine that allowed any number as input, including decimal fractions (or whatever base).
<br>Illegal numerals/digits are detected as well as illegal (or unsupported) bases.
<pre>
<lang rexxlike> ┌────────────────────────────────────────────────────────────────────┐
┌─┘ Input to this program (bases must be positive integers > 1): └─┐
│ │
Line 1,812 ⟶ 1,813:
│ toBase or inBase can be a comma (,) which causes the default │
└─┐ of 10 to be used. The limits of bases are: 2 ──► 90. ┌─┘
└────────────────────────────────────────────────────────────────────┘</lang>
/pre>
<lang rexx>/*REXX pgm converts integers from one base to another (base 2 ──► 90). */
@abc = 'abcdefghijklmnopqrstuvwxyz' /*the lowercase (Latin) alphabet.*/