Decimal floating point number to binary: Difference between revisions

m
→‎version 1: changed wording and whitespace in the REXX section header.
m (→‎version 1: changed wording and whitespace in the REXX section header.)
Line 1,102:
=={{header|REXX}}==
===version 1===
This REXX version will handle any number of digits, with bases up to '''242'''
(using extended ASCII characters).
 
Bases up to '''62''' will just use decimal digits along with upper and lowercase
(Latin) letters.
 
Line 1,114:
This program handles numbers with leading signs ('''-''', '''+''').
 
''Bases''   that are   ''negative''   are also supported   (which won't
be explained here).
 
Line 1,127:
 
The number of digits (numerals) in the result may be specified   (for
continued fractions).   The default is '''60'''.
 
The REXX program can handle any sized number   (as per the number of
digits)   that can be entered at the command line.
<lang rexx>/*REXX pgm converts any number in a base to another base including fractions; bases≤242.*/
parse arg number toBase inBase digits . /*optainobtain optional arguments from the CL*/
if toBase=='' | toBase=="," then toBase=10 /*Not specified? Then use the default.*/
if inBase=='' | inBase=="," then inBase=10 /* " " " " " " */