Numbers

A number in REXX is a character string that includes one or more decimal digits, with an optional decimal point. (See section Exponential Notation for an extension of this definition.) The decimal point may be embedded in the number, or may be a prefix or suffix. The group of digits (and optional decimal point) constructed this way can have leading or trailing blanks and an optional sign (+ or -) that must come before any digits or decimal point. The sign can also have leading or trailing blanks.

Therefore, number is defined as:
Read syntax diagramSkip visual syntax diagram
>>-+--------+--+------------------+--+-digits------------+------>
   '-blanks-'  '-sign--+--------+-'  +-digits--.--digits-+   
                       '-blanks-'    +-.--digits---------+   
                                     '-digits--.---------'   

>--+--------+--------------------------------------------------><
   '-blanks-'   

blanks
are one or more spaces
sign
is either + or -
digits
are one or more of the decimal digits 0–9.

Note that a single period alone is not a valid number.



rvse094.html | Timestamp icon Last updated: Monday, 5 June 2017