basic.inmat Function/BASIC Program

basic.inmat

Command basic.inmat Function/BASIC Program
Applicable release versions: AP 6.2, R91
Category BASIC Program (486)
Description returns information about arrays.

When used without any arguments, the inmat() function returns the number elements filled in the last matparse, matread, or dynamic to static array conversion. Note that inmat() is only valid immediately after these operations. If the number of elements overflowed, then inmat() returns -1.

When used with an array variable, the inmat function returns the dimensions of that array. If the array has one dimension, then the result is returned as a numeric value. If the array has two dimensions, then the result is returned as a dynamic array of the format "{maximum rows}]{maximum columns}".
Syntax inmat()
inmat(array.variable)
Options
Example
dimension x(10)
print inmat(x)
x = "a"
print inmat()

When run, the program prints:
10
1
Purpose
Related basic.array.variable
basic.$options