Hi
from wiki I learn that
OPTION BASE {0|1} sets the lower index of an array when it is not declared.
This statement affects array declarations where the lower bound of a dimension is not specified.
When used, OPTION BASE must come before any array declarations (DIM) to be affected.
By default, the lower bound for arrays is zero, and may be changed to one using the statement.
Otherwise, arrays will be dimensioned from element 0 if you DIM just the upper bounds.
You can also set other array boundaries by using TO in the DIM declaration such as DIM array(5 TO 10)
so the issue is only for array declared without DIM & TO
and this tells also that in the same code can be together arrays with only Upper limit, on these OPTION BASE works, with arrays with upper and lower limits declared, on these OPTION BASE doesn't work!
in the while I can affirm that on my PC (windows 10) the code of Steve runs with no output
this is the main.txt of internal folder of QB64...
this is the source code
PRINT " ", "a$()", "b$()" b$(0) = "0" '---> "Subscript out of range in Line 11" (press "Continue")
b$(1) = "1" '---> "Subscript out of range in Line 12"
total = max - min + 1 ' thanks to Steve
but also this code gains the message of error at first run and then no output situation
PRINT " ", "a$()", "b$()"
total = max - min + 1 ' thanks to Steve
....no OPTION BASE in this last code!
Moreover IMHO the use of OPTION BASE must be declared
obsolete or deprecated like it is done in other languages...
so who likes to type code in the old manner without using DIM + TO is free to do it, but he knows that his code brings into itself some potential glitches!