The inmat() function returns information about arrays.
inmat() inmat(array.var)
array.var | Specifying an array variable returns the dimensions of that array. |
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}".
dimension x(10) print inmat(x) x = "a" print inmat()
When run, the program prints:
10 1