Literal Number
A literal number is the base-10 representation of a real number as an integer, as a fixed-point decimal number, or in exponential notation. Use the Literal Number segment whenever you see a reference to a literal number in a syntax diagram.
Syntax
Literal Number .-------. .- + . V | |--+- - +--+---digit-+--+--------------+-+---------------------> | +-.------------+ | | | .-------. | | | | V | | | | '-.----digit-+-' | | .-------. | | V | | '-.----digit-+----------------' >--+----------------------------+-------------------------------| | .-------. | | .- + . V | | '-+- e +--+- - +----digit-+-' '- E '
Element | Description | Restrictions | Syntax |
---|---|---|---|
digit | Integer in range 0 through 9 | Must be an ASCII digit | Literal entered from the keyboard. |
Usage
You cannot include comma ( , ) or blank (ASCII 32) character. The unary plus ( + ) or minus ( - ) sign can precede a literal number, mantissa, or exponent.
You cannot include non-ASCII digits in literal numbers, such as the Hindi numbers that some nondefault locales support.