1.2.60 $PACKRECORDS : Alignment of record elements

This directive controls the byte alignment of the elements in a record, object or class type definition.

It is of the following form:

{$PACKRECORDS n}

Where n is one of 1, 2, 4, 8, 16, 32 C, NORMAL or DEFAULT (or 0). This means that the elements of a record which have size greater than n will be aligned on n byte boundaries. Elements with size less than or equal to n will be aligned to a natural boundary, i.e. to a power of two that is equal to or larger than the element’s size. The special value C is used to specify alignment as by the GNU CC compiler. It should be used only when making import units for C routines.

The default alignment (which can be selected with DEFAULT) is natural alignment.

More information on this and an example program can be found in the reference guide, in the section about record types.

The following shorthands can be used for this directive:

{$A1 }  
{$A2 }  
{$A4 }  
{$A8 }