TAL Programmer's Guide
Declaring Arrays
Using Arrays
7–8 096254 Tandem Computers Incorporated
Allocating Arrays The compiler allocates storage for an array in a particular storage area based on
declaration characteristics such as:
The global, local, or sublocal level
The direct, standard indirect, or extended indirect addressing mode
Allocating Direct Arrays
The compiler allocates storage for directly addressed arrays in the global, local, or
sublocal primary areas of the user data segment as shown in Figure 7-1.
Figure 7-1. Allocating Direct Arrays
INT(32) a[0:1]; !Global 
INT b[1:2]; ! arrays
PROC proc_a;
 BEGIN
 STRING c[0:2]; !Local
 FIXED d[0:3]; ! arrays
 SUBPROC subproc_a;
 BEGIN
 INT e[0:1]; !Sublocal 
 STRING f[0:3]; ! arrays
 !Lots of code
 END;
 !Lots of code
 CALL subproc_a;
 !More code
 END; 
G[0]
S[0]
L[1]C[0]
S[-3]
S[-2]
S[-1]
L[3]
Sublocal 
arrays
Global 
arrays
Local 
arrays
B[1]
B[2]
. . .
G[4]
C[1]
C[2]
. . .
. . .
E[0]
E[1]
F[0]
F[2]
F[1]
F[3]
370
A[0]
D[0]
A[1]
D[3]










