The UBOUND function returns the upper bound of a dimension of a compile-time or run-time dimensioned array. Example dim-num% = UBOUND(A%)