Rexx Programming/How to Rexx/number

From Wikibooks, open books for an open world
Jump to: navigation, search

In rexx, variables are typeless and are treated as variable length strings. When a number to a variable, the string that represents the number is stored in the variables. In rexx, numbers are simply a string of one or more digits with an optional decimalpoint.


Numbers can be represented using a variety of common notations:

Integer Representation[edit]

Decimal Representation[edit]

Floating Point Representation[edit]

Exponential floating point numbers may be represented in either scientific notation or engineering notation. The default floating point representation is scientific notation.

parse numeric my_numeric_settings
say my_numeric_settings


By default, numbers are expressed in decimal (base 10). In rexx, it is possible to express numbers in other bases.