HP Pascal/iX Programmer's Guide (31502-90023)
5-: 8
A record of the type Rec is 8-byte-aligned because its most restricted
field, l, must be 8-byte-aligned.
The variant part of a record of type Rec is 4-byte-aligned, because
the most restricted first field of the two variants, i, must be
4-byte-aligned.
A variable of type Rec is allocated 16 bytes. The TRUE and FALSE
variants are aligned like this:
TRUE Variant
FALSE Variant
Sometimes you can reduce the space that a record takes by declaring its
fields in different order.
Example
VAR
upr1 : RECORD
bf : Boolean;
pf : 0..32767;
cf : char;
END;
upr2 : RECORD
bf : Boolean;
cf : char;
pf : 0..32767;
END;
The only difference between the variables upr1 and upr2 is the order of
their fields.