____ | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


2.4.1 Decimal Literals

(1)
A decimal_literal is a numeric_literal in the conventional decimal notation (that is, the base is ten).
Syntax
(2)
       decimal_literal ::= numeral [.numeral] [exponent]
(3)
       numeral ::= digit {[underline] digit}
(4)
       exponent ::= E [+] numeral | E - numeral
(5)
Static Semantics
(6)
An underline character in a numeric_literal does not affect its meaning. The letter E of an exponent can be written either in lower case or in upper case, with the same meaning.
(7)
An exponent indicates the power of ten by which the value of the decimal_literal without the exponent is to be multiplied to obtain the value of the decimal_literal with the exponent.
Examples
(8)
Examples of decimal literals:
(9)
       12        0      1E6    123_456           --  integer literals

       12.0      0.0    0.456  3.14159_26        --  real literals

____ | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12