TAL Programmer's Guide

Using Indexes or Offsets
Using Equivalenced Variables
10–20 096254 Tandem Computers Incorporated
For direct INT previous variables, indexes and offsets both have word offsets:
INT x[0:1];
INT indx = x[1];
INT offst = x + 1;
x[0]
x[1]
INDX
OFFST
324
For direct previous variables other than INT, indexes have element offsets and offsets
have word offsets:
INT(32) xx;
INT indx = xx[1];
INT offst = xx + 1;
OFFST
INDX
325
Index
Offset
XX+1
XX+2
XX+3
XX+0
XX[0]
XX[1]
You can equivalence a variable to an offset simple pointer but not to an indexed
simple pointer:
INT addr[0:2];
INT .ptr = addr;
INT offst = ptr + 2;
!Offset allowed
INT indx = ptr[2];
!Index not allowed
326
?
OFFST
Offset
PTR+1
PTR+2
PTR+0
?
?