A declaration of a packed type has the form:
TYPE T = BITS n FOR Basewhere
Baseis a type and
nis an integer-valued constant expression. The values of type
Tare the same as the values of type
Base, but variables of type
Tthat occur in records, objects, or arrays will occupy exactly
nbits and be packed adjacent to the preceding field or element. For example, a variable of type
ARRAY [0..255] OF BITS 1 FOR BOOLEANis an array of 256 booleans, each of which occupies one bit of storage.
The values allowed for
n are implementation-dependent. An illegal
n is a static error. The legality of a packed type can
depend on its context; for example, an implementation could prohibit packed
integers from spanning word boundaries.