UBOUND function
Purpose: UBOUND will return the largest value of an array subscript. This only works with single dimensioned, static arrays. UBOUND returns dimensioned size - 1.
Syntax 1: RetVal% = UBOUND(ArrayName) Parameters:
|
Example:
DIM ArrayInt% [5] DIM ArrayStr$ [10] ArrayStr$ [0] = "zero" ArrayInt% [0] = 0 PRINT UBOUND(ArrayInt%) PRINT UBOUND(ArrayStr$)
Result:
4 9