pTAL Reference Manual (H06.03+)
Arrays
HP pTAL Reference Manual—523746-005
8-3
Declaring Arrays
The data type determines:
•
The kind of values that are appropriate for the array
•
The storage unit the compiler allocates for each array element as follows:
width
is a constant expression specifying the width, in bits, of the variable.
fpoint
is the implied fixed point of the FIXED variable.
identifier
is the array name.
.
.EXT
.SG
.SGX
are indirection symbols (see Table 2-7 on page 2-7).
range
lower-bound
is an INT or INT(32) constant expression (in the range -32,768 through 32,767)
that specifies the index (relative to the zeroth element) of the first array
element you want allocated.
upper-bound
is an INT or INT(32) constant expression (in the range -32,768 through 32,767)
that specifies the index (relative to the zeroth element) of the last array element
you want allocated.
For arrays declared outside of structures, upper-bound must be equal to or
larger than lower-bound.
Here are some examples of bounds:
STRING a_array [0:2];
INT b_array [0:19];
UNSIGNED(1) flags [0:15];
[ lower-bound : ]upper-bound
VST993.vsd










