pTAL Conversion Guide

Pointers
pTAL Conversion Guide527302-002
10-14
@ Operator
Data in Extended Memory (EXTADDR Address Types)
The address type of all pointers to extended memory segments is EXTADDR.
Extended memory pointers are allocated in the user data segment and usually point to
data in an extended memory segment; however, because an EXTADDR is 32 bits, you
can store the address of any of your processes’ data in an extended memory pointer.
For example, you can access data in your user data segment or in any of your
processes code segments or extended memory segments:
INT .EXT i;
STRING .EXT s;
INT .EXT g = 'SG' + 0;
REAL .EXT r;
@ Operator
In TAL and pTAL, you can apply an @ operator to any operand to obtain the address of
the data referenced by the operand.
TAL
The data type of the address returned by the @ operator is INT(32) for 32-bit
addresses, and INT for all other addresses.
pTAL
The data type of the address returned by the @ operator is one of the address types in
Table 10-4 on page 10-15:
WADDR w;
INT .p;
INT n;
n := w '-' @p; ! Both w and @p have data type WADDR
Table 10-4
on page 10-15 shows the address type returned for each pTAL operand to
which you can apply the @ operator.