qb45advr.hlp (
Topic list)
OPTION BASE Statement Programming Example
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
OPTION BASE Statement Programming Example
This example shows the use of OPTION BASE to override the default
base array subscript value of 0. Subscripts in array A range from
1 to 20 rather than 0 to 19.
CLS ' Clear screen
OPTION BASE 1
DIM A(20)
PRINT "The base subscript in array A is"; LBOUND(A)
PRINT "The upper bound subscript in array A is"; UBOUND(A)
Sample Output
The base subscript in array A is 1
The upper bound subscript in array A is 20