$PACKRECORDS : Alignment of record elements

[next] [prev] [prev-tail] [tail] [up]

#### 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 an ABI alignment greater than n will be aligned on n byte boundaries. Elements with size less than or equal to n will be aligned to the ABI alignment for the platform. The special value C is used to specify alignment as by the platform’s C compiler. It must be used when making import units for C structured.

The default alignment (which can be selected with DEFAULT) is the ABI 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 }

[next] [prev] [prev-tail] [front] [up]