Description | Explicitly set the default lower bound for all array subscripts |
Syntax | Option Base {0|1} |
Remarks | The base of an array is the index value of its lower bound. The default base (lower bound) of an array is 0. In a five-element, one-dimensional array, the lower bound is 0 and the upper bound is 4. A five-element, one-dimensional array using Option Base 1 has a lower bound of 1 and an upper bound of 5. See the table below for examples. |
Statement | Dimensions | Lower Bound | Upper Bound | Elements |
Option Base 0 | 1 | 0 | 4 | 5 |
Option Base 1 | 1 | 1 | 5 | 5 |
Option Base not used | 1 | 0 | 4 | 5 |
Dim myarray (0 to 3) | 1 | 0 | 3 | 4 |