Typed constants | Previous Top Next

Typed constants, unlike true constants, can hold values of array, record, procedural, and pointer types. Typed constants cannot occur in constant expressions.
Declare a typed constant like this:
const identifier: type = value
where identifier is any valid identifier, type is any type except files and variants, and value is an expression of type type. For example,
const Max: Integer = 100;
In most cases, value must be a constant expression; but if type is an array, record, procedural, or pointer type, special rules apply.