pTAL Reference Manual (H06.03+)
Structures
HP pTAL Reference Manual—523746-005
9-38
Declaring Referral Structures
Declaring Referral Structures
A referral structure declaration allocates storage for a structure whose layout is the
same as the layout of a previously declared structure or structure pointer.
.
.EXT
.SG
.SGX
are indirection symbols (see Table 2-7 on page 2-7).
identifier
is the identifier of the new referral structure.
referral
is the identifier of a previously declared structure or structure pointer that provides
the structure layout for this structure.
STRUCT B (*) FIELDALIGN (SHARED8);
BEGIN
INT K;
FILLER 14;
STRUCT A2 (A); ! Base of A2 is guaranteed to be aligned on
! 16-byte boundary. Compiler issues warning
! here because A is declared with STRUCTALIGN
! (MAXALIGN) and B is a SHARED8 structure.
END;
STRUCT B1 (B); ! Base of B1 is guaranteed to be aligned on
! 16-byte boundary because the largest
! alignment of the components of B1 (A2) is
! 16 bytes.
Example 9-30. Template Structure With STRUCTALIGN(MAXALIGN) (page 2 of 2)
STRUCT
identifier
(
referral
)
.
.EXT
.SG
.SGX
range
;
VST025.vsd










