DIMS() Function - Get Array Dimensions

Syntax

DIMS(arrayname{,ERR=lineref})

Description

For BBj-specific information, see the DIMS() Function - BBj.

The DIMS() function returns the dimensions of an array. The 25-character string that is returned may be addressed using the following template:

dimensions:i(1),
dim0elem:i(4),
dim0base:i(4),
dim1elem:i(4).
dim1base:i(4),
dim2elem:i(4),
dim2base:i(4)

Examples

0100 LET D$="dimen:i(1),d0elem:i(4),d0base:i(4),
0100:d1elem:i(4),d1base:i(4),d2elem:i(4),d2base:i(4)"
0110 DIM DIMENSION$:D$
0120 DIM A[5,5]
0130 LET DIMENSION$=DIMS(A[ALL])
0140 FOR O%=DIMENSION.D0BASE TO DIMENSION.D0ELEM+DIMENSION.D0BASE-1
0150 FOR I%=DIMENSION.D1BASE TO DIMENSION.D1ELEM+DIMENSION.D1BASE-1
0160 PRINT A[O%,I%],
0170 NEXT I%
0180 PRINT " "
0190 NEXT O%

See Also

Functions - Alphabetical Listing