pTAL Reference Manual (H06.03+)

Structures
HP pTAL Reference Manual523746-005
9-51
Declaring Structure Pointers in Structures
Declaring Structure Pointers in Structures
A structure pointer is a variable that contains the address of a structure. When you
declare a structure pointer inside a structure, the form is:
Example 9-41. Assigning Addresses to Pointers in Structures
STRUCT .s1;
BEGIN
INT var1;
INT var2;
END;
STRUCT .s2;
BEGIN
INT .std_ptr (s1);
INT .EXT ext_ptr (s1);
END;
PROC g MAIN;
BEGIN
@s2.std_ptr := @s1[0];
@s2.ext_ptr := $XADR(s1);
END;
identifier
VOLATILE
STRING
INT
( )referral
.
.EXT
.SG
.SGX
REFALIGNED
( 2
8
)
;
,
VST628.vsd