The UBOUND function returns the largest valid index (upper bound) of an array dimension.
result% = UBOUND(arrayName[, dimension%])
arrayName specifies the name of the array.
dimension% specifies the dimension number, starting with 1 for the first dimension.
UBOUND, along with LBOUND, is used to determine the range of valid indexes of an array.
DIM myArray(5) AS INTEGER DIM myOtherArray(1 to 2, 3 to 4) AS INTEGER PRINT UBOUND(myArray) PRINT UBOUND(myOtherArray, 2)
5 4
There was an error while loading. Please reload this page.
Navigation