Non-decimal radices/Input: Difference between revisions

Content added Content deleted
m (→‎{{header|XPL0}}: use template)
m (→‎{{header|REXX}}: simplified two subroutines. -- ~~~~)
Line 824: Line 824:


exit /*stick a fork in it, we're done.*/
exit /*stick a fork in it, we're done.*/

/*────────────────────────────add these subroutines to end─of─program. */
/*────────────────────────────add these subroutines to end─of─program. */
d2b: return x2b(d2x(arg(1))) /*with this subroutine, dec──>bin is OK.*/
d2b: return x2b(d2x(arg(1)))+0 /*with this subroutine, dec──►bin */
b2d: return x2d(b2x(arg(1))) /* " " " bin──>dec is OK.*/
b2d: return x2d(b2x(arg(1))) /* " " " bin──►dec */
b2c: return x2c(b2x(arg(1))) /* " " " bin──>chr is OK.*/
b2c: return x2c(b2x(arg(1))) /* " " " bin──►chr */
c2b: return x2b(c2x(arg(1))) /* " " " chr──>bin is OK.*/
c2b: return x2b(c2x(arg(1)))+0 /* " " " chr──►bin */</lang>
</lang>


=={{header|Ruby}}==
=={{header|Ruby}}==