Returns the highest array subscript for the specified array dimension.
v=UBOUND
(array_name[, dimension])
array_name is the variable name of the array.
dimension is an integer value specifying the dimension in a multidimensional array. The default value is 1.
DIM a(1 TO 5, 1 TO 10, 1 TO 25)
PRINT UBOUND(a), UBOUND(a, 2), UBOUND(a, 3)
5 10 25