pTAL Conversion Guide

Pointers
pTAL Conversion Guide527302-002
10-16
pTAL
STRUCT .EXT t; ! Structure in extended memory
BEGIN
STRUCT s1; ! Substructure
BEGIN
INT k;
END;
END;
... := @i; ! Data type of @i is WADDR
... := @j; ! Data type of @j is EXTADDR
... := @sw; ! Data type of @sw is SGWADDR
... := @sb; ! Data type of @sb is SGXBADDR
... := @s; ! Data type of @s is WADDR
... := @s.s1; ! Data type of @s.s1 is BADDR
... := @t; ! Data type of @t is EXTADDR
... := @t.s1; ! Data type of @t.s1 is EXTADDR
... := @s.s1.k; ! Data type of @s.s1.k is WADDR
... := @t.s1.k; ! Data type of @t.s1.k is EXTADDR
Example 10-2. @ Operator Applied to Control Structure Elements
IPROC p;
BEGIN
LABEL b1;
ENTRY e1;
SUBPROC sp;
BEGIN
LABEL b2;
ENTRY e2;
b2:
e2:
... := @b2; ! @b2 returns a CWADDR value
... := @e2; ! @e2 returns a CWADDR value
... := @sp; ! @sp returns a CWADDR value
END;
... := @p; ! @p returns a PROCADDR value
... := @sp; ! @sp returns a CWADDR value
... := @b1; ! @b1 returns a CWADDR value
... := @e1; ! @e1 returns a PROCADDR value
... := @e2; ! @e2 returns a CWADDR value
END;
Example 10-1. @ Operator Applied to Structure Elements (page 2 of 2)