Comment by Symbiote
3 years ago
In my first job, I was given a VB6 project to maintain which had a mixture of "Option Base 1" and "Option Base 0" (or unspecified, this being the default), with occasional "On Error Resume Next". This specifies the index value for the first item in an array, i.e. you could choose the default European building floors (ground floor is 0) or American floors (ground floor is 1) -- per module!
I had to convert everything to "Option Base 0" before I could start fixing the reported bugs, it was far too confusing following the arrays passed between modules being indexed starting at 0, then 1, then 0 etc.
Would not the UBound and LBound functions not solved those issues?
Yes, though I didn't know they existed.
The existing code was written with 0 or 1 as required (except where there were bugs), and frankly I think it's was better anyway to use 0 everywhere rather than LBound(x).