forked from QB64-Phoenix-Edition/QB64pe
-
Notifications
You must be signed in to change notification settings - Fork 0
LBOUND
Samuel Gomes edited this page Nov 8, 2022
·
1 revision
The LBOUND function returns the smallest valid index (lower bound) of an array dimension.
result% = LBOUND(arrayName[, dimension%])
- 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 ERROR Codes error occurs.
- LBOUND and UBOUND are 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 LBOUND(myArray)
PRINT LBOUND(myOtherArray, 2)
0
3