Purpose |
Return the largest possible subscript (boundary) for an array's specified dimension. |
Syntax |
y = UBOUND(array [(dimension)]) y = UBOUND(array, dimension) |
Remarks |
array is the
array of interest. dimension is an
|
Restrictions |
UBOUND cannot be used on arrays within User-Defined Types. |
See also |
|
Example |
' Dimension an array with lower and upper bounds DIM MyArray%(1900 TO 2000,5 TO 10)
' print out the values of the array Message$ = "The array's first dimension is from" + _ STR$(LBOUND(MyArray%(1))) + "to" + _ STR$(UBOUND(MyArray%(1))) Message$ = "The array's second dimension is from" + _ STR$(LBOUND(MyArray%(2))) + "to" + _ STR$(UBOUND(MyArray%(2))) |
Result |
The array's first dimension is from 1900 to 2000 The array's second dimension is from 5 to 10 |