By default all enumerations are stored as a longword (4 bytes), which is equivalent to specifying the {$Z4}, {$PACKENUM 4} or {$PACKENUM DEFAULT} switches.
This default behavior can be changed by compiler switches, and by the compiler mode.
In the tp compiler mode, or while the {$Z1} or {$PACKENUM 1} switches are in effect, the storage space used is shown in table (8.1).
|
When the {$Z2} or {$PACKENUM 2} switches are in effect, the value is stored on 2 bytes (word), if the enumeration has less or equal then 65535 elements, otherwise, the enumeration value is stored as a 4 byte value (longword).