QBasic 1.1: UBOUND Function
Explanation
LBOUND, UBOUND Functions
Return the lower and upper bound (smallest or largest available subscript) for the specified array dimension.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
LBOUND(array[,dimension%]) |
UBOUND(array[,dimension%]) |
Description / Parameter(s)
array |
The name of the array. |
dimension% |
Indicates the array dimension whose lower or upper bound is returned. Use 1 for the first dimension, 2 for the second dimension, etc. The default is 1. |
Example
DIM a%(1 TO 3, 2 TO 7)
PRINT LBOUND(a%, 1), UBOUND(a%, 2)