pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

identifier
is the identifier of the template structure.
(*)
is the symbol for a template structure.
STRUCTALIGN (MAXALIGN)
causes each definition structure that uses this template to be aligned on a 16-byte boundary
(for more information, see STRUCTALIGN (MAXALIGN) Attribute (page 137)).
field-alignment
FIELDALIGN
specifies how you want the compiler to align the base of the structure and fields in the
structure. The offsets of fields in a structure are aligned relative to the base of the structure.
If a definition substructure does not specify a FIELDALIGN clause, the contained substructure’s
field alignment is the field alignment of its encompassing structure or substructure.
If you do not specify a FIELDALIGN clause on a structure declaration, pTAL uses the current
value of the FIELDALIGN compiler directive. The default value of the FIELDALIGN directive
is AUTO.
If you specify a FIELDALIGN (NODEFAULT) compiler directive, you must specify a
FIELDALIGN clause on every definition structure and template structure.
SHARED2
specifies that the base of the structure and each field in the structure, except STRING fields,
must begin at an even-byte address.
SHARED8
specifies that the offset of each field in the structure from the base of the structure must
begin at an address that is an integral multiple of the width of the field.
AUTO
specifies that the structure and the fields of the structure be aligned according to the optimal
alignment for the architecture on which the program will run (this is not the same behavior
as the AUTO attribute has in the native mode HP C compiler).
PLATFORM
specifies that the structure and the fields of the structure must begin at addresses that are
consistent across all languages on the same architecture.
A template structure has meaning only when you refer to it in the subsequent declaration of a
referral structure, referral substructure, or structure pointer. The subsequent declaration allocates
space for a structure whose layout is the same as the template layout.
The declaration in Example 80 (page 141) associates an identifier with a template structure layout
but allocates no space for it.
140 Structures