5. Constant declarations

A constant declaration associates an identifier with a constant value.
ConstantDeclaration =IdentDef "=" ConstExpression.
ConstExpression=Expression.
A constant expression is an expression that can be evaluated by a mere textual scan without actually executing the program. Its operands are constants (Ch.8) or predeclared functions (Ch.10.3) that can be evaluated at compile time. Examples of constant declarations are:
N = 100
limit = 2*N - 1
fullSet = {MIN(SET) .. MAX(SET)}

Previous Section, Next Section, Contents
Adapted to HTML by Jürgen Geßwein; 8. Juni 1995