Comment by int_19h

3 months ago

Most oldschool BASIC dialects (including the original Dartmouth IIRC) use 0-based indices, though. It's the worst of both worlds, where something like:

  DIM a(10)

actually declares an array of 11 elements, with indices from 0 to 10 inclusive.

I believe it was QBASIC that first borrowed the ability to define ranges explicitly from Pascal, so that we could do:

  DIM a(1 TO 10)

etc to avoid the "zero element tax"