Jump to content

Non-decimal radices/Input: Difference between revisions

m
→‎{{header|REXX}}: simplified two subroutines. -- ~~~~
m (→‎{{header|XPL0}}: use template)
m (→‎{{header|REXX}}: simplified two subroutines. -- ~~~~)
Line 824:
 
exit /*stick a fork in it, we're done.*/
 
/*────────────────────────────add these subroutines to end─of─program. */
d2b: return x2b(d2x(arg(1)))+0 /*with this subroutine, dec──>bin dec──►bin is OK.*/
b2d: return x2d(b2x(arg(1))) /* " " " bin──>dec bin──►dec is OK.*/
b2c: return x2c(b2x(arg(1))) /* " " " bin──>chr bin──►chr is OK.*/
c2b: return x2b(c2x(arg(1)))+0 /* " " " chr──>binchr──►bin is OK.*/</lang>
</lang>
 
=={{header|Ruby}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.