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

#### $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, 16, C, NORMAL or DEFAULT. This means that the elements of a record that 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 type 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 2, contrary to Turbo Pascal, where it is 1.

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

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