Coral 66 Language Reference Manual: For mission-critical applications | ||
---|---|---|
Prev | Chapter 10. Names and Constants | Next |
Numerical constants appearing in other sections of this definition are of the following types:
Constants for presetting, optionally signed.
Integers and reals as primaries in expressions. A sign attached to a primary belongs syntactically to the expression and not to the number.
Integers and signed integers used in declarations or specifications, typically for defining fixed scales, bit-fields and array bounds.
The syntactic classification is as follows:
Constant
::=
Number
Addoperator
Number
Number
::=
Real
Integer
Signedinteger
::=
Integer
Addoperator
Integer
Real
::=
Digitlist
. Digitlist
Digitlist
10
Signedinteger
10
Signedinteger
Digitlist
. Digitlist
10
Signedinteger
OCTAL ( Octallist
. Octallist
)
Integer
::=
Digitlist
OCTAL ( Octallist
)
LITERAL ( printing character )
The further expansions are
Digitlist
::=
Digit
Digit
Digitlist
Octallist
::=
Octaldigit
Octaldigit
Octalist
Octaldigit
::= 0 1 2 3 4 5 6 7
where 0 to 7 are alternatives.