TAL Reference Manual

Arrays
TAL Reference Manual526371-001
7-5
Read-Only Array Declaration
Read-Only Array Declaration
A read-only array declaration allocates storage for a nonmodifiable array in a user
code segment. Read-only arrays are sometimes referred to as P-relative arrays,
because they are addressed using the program counter (the P register).
type
is any data type except UNSIGNED.
identifier
is the identifier of the read-only array.
lower-bound
is an INT 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. The default value is 0.
upper-bound
is an INT 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. The default value is the number of elements initialized minus one.
'P'
specifies a read-only array. Read-only arrays are addressed using the program
counter (the P register).
initialization
is a constant list to assign to the array elements. You must initialize read-only
arrays when you declare them. (Constant lists are described in Section 3, Data
Representation.)
Specify initialization values that are appropriate for the data type of the array. For
example, if the decimal setting of an initialization value differs from the
fpoint of a
type identifier
=
[
:
]
'p' := initialization ;
,
lower-
bound
upper-
bound
VST0702.vsd