UBOUND

Action

Returns the largest available subscript for one of the dimensions of an array.

 

Syntax

UBOUND (array, dimension)

 

Parameter

Array

The array you want to know the upper boundary of.

Dimension

Optional parameter indicating the dimension of the array you want to know the upper boundary of. The default is 1.

Returns

 

-1

Array dimension has zero elements.

>= 0

Largest available subscript for the indicated dimension of the array.

 

Example

$x = UBOUND($MyArray)