Table of Contents

Advertisement

6-2 Program Commands
DIM
[Array name
J [ ,
Array name]
*
®
Function
:
Declares an array.
Parameter:
One-dimensional to three-dimensional arrays can be
specified.
1) Array name (i) when one-dimensional
2) Array name (i,
j)
when two-dimensional
3) Array name
(i, j,
k) when three-dimensional
4) Changes from DEFM mode to DIM mode if the array name is defaulted
.
Array names i, j, k may be specified by the numeric expression 0
~
i, j, k
:;;;:: 255. Discards decimal
values.
Upper case alphabetical letters may be used for the array name.
Explanation
:
1) Declares array variable names.
2) Character arrays can be declared by attaching a $ sign immediately after the
array variable name. The storable character length of a character array is a
maximum of seven characters.
If
an attempt is made to assign a character
string with more than seven characters, all beyond seven characters will be
disregarded
.
3) The same array name can be used for a numeric array name and a character
array name.
4) Up to eight arrays can be declared. Error 1 will occur if nine or more are
declared
.
5) Error 5 will occur if arrays are declared with the same array variable name
and the different size (i, j, k) of the subscript. When array variables of the
same size are declared, contents of all array variables will become 0 or null.
133

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents