qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
.optx
:nOPTION 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