Skip to main content

$MVINMAT

Returns the number of MultiValue array elements.

Synopsis

$MVINMAT(array)

Parameter

Argument Description
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

  • MVDIM command

  • INMAT function in the Caché MVBasic Reference

  • DIM statement in the Caché MVBasic Reference

  • MATPARSE statement in the Caché MVBasic Reference

  • MATREAD statement in the Caché MVBasic Reference

FeedbackOpens in a new tab