Dim - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

(
(
(
DIM
DI M array-name (rows [,columnsl ) [,array-name (rows [,columnsl )J. •.
The DIM statment allows you to explicity specify the size of arrays. The syntax of
the DIM statement is as shown:
DIM array-name (rows [,columnsl) [,array-name (rows ['columnsl)J. ••
where:
array-name
is an arithmetic or character array to be dimensioned.
rows, columns
are nonzero, unsigned integer constants specifying the dimensions
of the array. One-dimensional arrays require only the rows entry. Two-dimen-
sional arrays require both rows and columns entries.
A one-dimensional array whose name is specified in a DIM statement is defined as
having the number of elements represented by the rows entry. A two-dimensional
array whose name is specified in a DIM statement is defined as having the number of
rows and the number of columns entered in the statement.
The initial value of each arithmetic array element is zero; each character array element
is 18 blank characters.
Notes About DIM
• An array name cannot appear in a DIM statement if it has been previously
defined, either implicitly or explicitly in a USE statement or a prior DIM
statement.
• An arithmetic or character array of one or two dimensions can be defined in a
DIM statement.
• The maximum permissible size of each dimension in an array is 255.
67

Advertisement

Table of Contents
loading

Table of Contents