2.4.1 Decimal Literals
1
Syntax
2
3
4
4.1/2
5
An
exponent
for an integer literal shall not have a minus sign.
5.a
Ramification: Although this rule is in
this subclause, it applies also to the next subclause.
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.
6.a
Ramification: Although these rules are
in this subclause, they apply also to the next subclause.
7
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
Wording Changes from Ada 83
9.a
We have changed the syntactic category name
integer to be
numeral.
We got this idea from ACID. It avoids the confusion between this and
integers. (Other places don't offer similar confusions. For example,
a
string_literal
is different from a string.)
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe