ex.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.
OPTION BASE Statement Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses the OPTION BASE statement to override the default base
' array subscript value of 0. Subscripts in array A range from 1 to 20 rather
' than 0 to 20.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Copy the code example below to the code window
' 3. Press F5 to run the example
 
 CLS                              ' Clear the 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)