Returns the number of array elements.
||Optional The name of a dimensioned array; must be a literal name, not enclosed with quotes. If omitted, the most recently parsed dimensioned array.
function has two uses:
returns the defined dimensions of the named array.
returns the number of elements loaded into the most recently parsed array.
Before invoking INMAT
, an array must have been dimensioned using the DIM
takes the name of a dimensioned array and returns a two-element dynamic array containing the rows
dimensions of the array. If the DIM
did not specify a columns
returns 1 as the columns
Specifying an array
value that is not a dimensioned array results in a #1039 compile error. The array
must be an explicitly dimensioned static array. Specifying an implicitly dimensioned (dynamic) array results in a runtime <ARRAY DIMENSION> error.
defaults to the most recently loaded array. It returns an integer specifying the number of elements that were loaded using a MATREAD
, or MATPARSE
statement. If no array has been loaded, or the most recently loaded array was loaded with the null string or with a single element, INMAT()
The following example returns the row and column dimensions of a dimensioned array:
! Returns 6ý5
The following example returns the number of dimensioned array elements parsed by MATPARSE
MATPARSE MyArray FROM x
! Returns 3
© 1997-2019 InterSystems Corporation, Cambridge, MA