This directive tells the compiler the minimum number of bytes it should use when storing enumerated types. It is of the following form:
Where the form with $MINENUMSIZE is for Delphi compatibility. xxx can be one of 1,2 or 4, or NORMAL or DEFAULT (or 0).
The default enumeration size depends on the compiler mode:
As an alternative form one can use {$Z1}, {$Z2}{$Z4}. The {$Z} form takes a +/- argument, where + is equivalent to {$Z4} and - is equivalent to {$Z1}.
So the following code
will use 1 byte to store a variable of type Days, whereas it normally would use 4 bytes. The above code is equivalent to
or equivalent to