pTAL Conversion Guide
Structures
pTAL Conversion Guide—527302-002
11-11
Definition Structure Syntax
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.
In pTAL:
•
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 must 
begin at an even-byte address except STRING fields, which can begin at any 
byte address, and UNSIGNED fields for which the rules are described later in 
this section.
pTAL allocates the same offsets and widths for the fields of a structure 
declared with FIELDALIGN(SHARED2) as TAL does for the same structure.
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. The structure must begin at an address that is an integral multiple of 
the width of the widest field in the structure; therefore:
•
A one-byte field (STRING) can begin at any byte address.
•
The byte offset of a two-byte field (INT, UNSIGNED(1-16)) must be an 
even number, except that contiguous UNSIGNED fields can be packed.
FIELDALIGN
( SHARED2
SHARED8
AUTO
PLATFORM
)
VST992.vsd










