pTAL Reference Manual (H06.03+)
Data Representation
HP pTAL Reference Manual—523746-005
3-22
Constant List Alignment Specification
FIELDALIGN-clause
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. For more information about constant list alignment, see Constant List
Alignment Specification on page 3-22.
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.
SHARED8
specifies that the offset of each field in the structure from the base of the
structure must be begin at an address that is an integral multiple of the width of
the field.
Constant List Alignment Specification
A constant list alignment specification controls the alignment of elements of constant
lists whose element type is not STRING. Such a constant list can have an alignment of
SHARED2 or SHARED8. Nested constant lists cannot have an alignment specification;
they inherit the alignment of the containing constant list. SHARED2 causes alignment
identical to TAL. SHARED8 additionally requires that 4-byte and 8-byte scalars are
aligned to their size. You must insert filler constants of ensure proper alignment of
4-byte and 8-byte aligned items. A SHARED8 constant list containing an item that is
misaligned is an error.
An optional alignment specification gives the alignment of a constant list. It occurs
immediately before the opening bracket of the constant list. There is no default
constant list alignment. The alignment specification is required if SHARED2 and
SHARED8 would give different results.
A1 ':=' [1,2,3,4]; ! No alignment specification
! required
A1 ':=' FIELDALIGN(SHARED2) [1,2D,4]; ! Alignment specification required
! to specify 2-byte alignment for
! 2D
FIELDALIGN SHARED2
SHARED8
( )
VST065.vsd










