Constant expressions are a subset of the general class of expressions,
restricted by the requirement that it be possible to evaluate the expression
statically. All operations are legal in constant expressions except for
ADR, LOOPHOLE, TYPECODE, NARROW, ISTYPE,
SUBARRAY, NEW, dereferencing (explicit or implicit), and the
only procedures that can be applied are the functions in the Word
interface.
A variable can appear in a constant expression only as an argument to
FIRST, LAST, NUMBER, BITSIZE, BYTESIZE, or
ADRSIZE, and such a variable must not have an open array type.
Literals and top-level procedure constants are legal in constant expressions.