UBOUND - mkilgore/QB64pe GitHub Wiki
The UBOUND function returns the largest valid index (upper bound) of an array dimension.
- result% = UBOUND(arrayName[,])
- arrayName specifies the name of the array.
-
dimension% specifies the dimension number, starting with 1 for the first dimension.
- If omitted, dimension% is assumed to be 1.
- If dimension% is less than 1 or is greater than the number of dimensions, a subscript out of range error occurs.
- UBOUND, along with LBOUND, is used to determine the range of valid indexes of an array.
PRINT UBOUND(myArray) PRINT UBOUND(myOtherArray, 2) |
5 4 |
Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page