ALIGNMENT [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation
HP Pascal/iX Reference Manual
ALIGNMENT
ALIGNMENT is an HP Pascal Option.
The ALIGNMENT compiler option specifies the alignment requirements for a
type (for the definition of alignment see Chapter 5 ). It cannot be
used with string or file types. The alignment of a record or array must
be at least as large as its largest field or element.
ALIGNMENT does not support alignments greater than 8 bytes for variables.
Only fields are aligned greater than 8 bytes. However, you can align a
record or array with more than 8 bytes through a call to P_GETHEAP with
the appropriate alignment parameter.
Syntax
$ALIGNMENT integer$
Parameter
integer In the range 1..2048. The following values for integer
specify the alignments indicated. Other values are
illegal.
Click here to view figure.
Default Depends upon packing algorithm.
Location After the symbol = in a type definition.
Example
TYPE
Rec = $ALIGNMENT 16$
RECORD
F1 : Integer;
F2 : ShortInt;
F3 : Real;
END;
Integer_ = $ALIGNMENT 2$ Integer;
Ptr = ^Integer_;
MPE/iX 5.0 Documentation