Sets the default lower array bound.
OPTION BASE {0 |
1} |
If you don’t specify the default bound, QBasic uses 0.
You can specify only one OPTION BASE
statement per module.
For more flexibility, use the TO
clause in the DIM statement.
OPTION BASE 0
DIM a(1 TO 20)
DIM b(20)
PRINT LBOUND(a). LBOUND(b)
PRINT UBOUND(a), UBOUND(b)
Results in:
1 0
20 20