TAL Programmer's Guide
Accessing Structure Items
Using Structures
096254 Tandem Computers Incorporated 8–37
The last two statements in the following example access S3 to which the structure
pointers declared in S2 point:
INT .a[0:99]; !Declare array A
STRUCT .s3; !Declare S3
 BEGIN
 INT b[0:99]; !Declare array B
 END;
STRUCT .s2; !Declare S2
 BEGIN
 INT .std_ptr (s3); !Declare STD_PTR
 INT .EXT ext_ptr (s3); !Declare EXT_PTR
 END;
PROC i MAIN;
 BEGIN
 @s2.std_ptr := @s3; !Assign standard address
 ! of S3 to S2.STD_PTR
 @s2.ext_ptr := $XADR(s3); !Assign extended address
 ! of S3 to S2.EXT_PTR
 a[1] := s2.std_ptr.b[1]; !Assign content of
 ! S3.B[1] to A[1]
 s2.ext_ptr.b[2] := a[2]; !Assign content of A[2]
 END; ! to S3.B[2]










