Joergen,
It is the first time that I think of it, however I think that even this
would be syntactical much nicer if it was possible
X(5) as String()
5 items with the variable name X from which is the type a String Array
Just as thought,
I would read that as an array of arrays
Never mind.
(In fact it is in VB six items. However let us forget that crazy decision)
One of those things where the .Net framework at its core did
not support the old ways of doing things in VB. Easier to have
every array 0-based rather than having to take a base value into
account every time an array item is addressed, I suppose. I'm sure
that has been debated for the last 5 years.
To be more explicit in VS2002/VS2003 one would write
Dim x(6 - 1) As Integer
for an array of six items.
In VS2005, we can finally write
Dim x(0 To 5) As Integer
or
Dim x(0 To 6 - 1) As Integer
but the lower bound must always be 0 in those declarations.
Then, of course, there are those who just don't care and
write
Dim x(6) As Integer
when they want a "1 To 6" array. Never mind that they are
wasting index 0 and should be careful not to iterate through
the array using For Each ... etc.
I don't really miss non-0-based arrays that much, though the
lack of them has hurt a few times when upgrading old VB6
code.
Regards,
Joergen Bech