pTAL Reference Manual (H06.08+)
Structures
HP pTAL Reference Manual—523746-006
9-58
Definition Substructure
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.
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.
previous-identifier
is the identifier of a simple variable, array, substructure, or pointer previously
declared in the same structure. No index is allowed with this identifier.
structure-layout
is the same BEGIN-END block as for structures. It can contain declarations for
simple variables, arrays, substructures, filler bits, filler bytes, redefinitions, simple
pointers, and structure pointers. The size of one substructure occurrence is the
size of the layout, either in odd or even bytes. The total layout for one occurrence
of the encompassing structure must not exceed 32,767 bytes.
If the previous item is a substructure and you omit the bounds or if either bound is 0,
the new substructure and the previous substructure occupy the same space and have
the same offset from the beginning of the structure.
Example 9-45. Definition Substructure Redefinition
STRUCT a;
BEGIN
STRING x;
STRUCT b; ! b starts on odd byte
BEGIN
STRING y;
END;
STRUCT c = b; ! Redefine b as c, also on odd byte
BEGIN
STRING z;
END;
END;










