UBOUNDARRAY FunctionWindows/Unix

A function that returns the upper bound of the array.

Syntax: UBOUND(arrayname [,dimension])
DIM A(-50 TO 100) AS INTEGER
L% = UBOUND(A) '-- Returns 100

Details:
If the array has multiple dimensions, you can use the optional dimension argument to check the upper bound of each one. 

NOTE:
There is no checking for limits on arrays. You can "read" an array value outside that used in DIM, giving unpredictable results.  Always keep track of your array start and end instead of LBOUND and UBOUND for the best results.

Do not use variable names with a variable symbol with %, !, #, etc.,
DIM A%(-50 TO 100) AS INTEGER
L% = UBOUND(A%) '-- Returns 0