48
Redimensioning
Arrays
Numeric and character arrays can be redimensioned according
to
the following rules:
• Both one- and two-dimensional arrays can be redimensioned.
• The total number
of
elements
in
an array after redimensioning must
not
exceed
the number originally specified when
the
array was declared.
• The number
of
dimensions can
be
changed.
• The maximum value for a dimension
is
255.
• An array can be redimensioned
in
a
MAT
assignment statement, a MAT READ
statement, a MAT INPUT statement,
or
a
MAT
GET statement.
• The new dimensions for the array can
be
specified with either a constant
or
by an expression.
Arithmetic
Arrays
An arithmetic array contains only numeric data and can have one or
two
dimensions.
Arithmetic arrays are named by a single letter
of
the extended alphabet (A-Z,
@,
#,
and $). Thus,
the
letter A can be used
to
name an arithmetic variable or an arithmetic
array, or both, while the symbol A2 can only be used
to
name an arithmetic variable.
For example:
A=6
A(l)
= 9
where the variable A
= 6 (scalar) and
A(l)
= 9 (arithmetic array element).
All
ele-
ments
of
an arithmetic array are initially set
to
zero when
the
program
is
executed
(except those assigned
to
the common storage area for use
in
a program
that
is
chained
to;
see
USE
and CHAIN, Chapter 4).
Before being used
in
any
of
the
matrix-handling statements,
an
arithmetic array must
have been previously dimensioned, either explicitly or implicitly. Arithmetic arrays
can be redimensioned
as
described previously.
/
''''*---.