The inmat() function returns information about arrays.
Syntax
inmat() inmat(array.var) |
Parameter(s)
array.var |
Specifying an array variable returns the dimensions of that array. |
Description
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}".
NOTE |
This function requires an extended $options setting. |
Example(s)
dimension x(10) print inmat(x) x = "a" print inmat() |
When run, the program prints:
10 1 |
See Also