Caché ObjectScript Reference
$MVINMAT
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Returns the number of MultiValue array elements.
Synopsis
$MVINMAT(array)
Parameter
array Optional — The name of an array. If omitted, the most recently parsed array.
Description
The $MVINMAT function returns the number of elements in an array that has been loaded using a MultiValue MATREAD, MATREADU, or MATPARSE statement.
An array must be dimensioned using the ObjectScript MVDIM command or the MultiValue DIMENSION statement.
The ObjectScript $MVINMAT function corresponds to the Cache MultiValue Basic INMAT function.
Examples
The following example returns the number of elements in a one-dimensional (vector) array.
  SET x=8
  MVDIM myarray(x)
  WRITE $MVINMAT(myarray)
 
The following example returns the number of elements in a two-dimensional (matrix) array.
  SET x=7,y=5
  MVDIM myarray(x,y)
  WRITE $MVINMAT(myarray)
 
See Also