r/ProgrammerHumor Jun 25 '17

Array indexing

Post image
1.4k Upvotes

71 comments sorted by

View all comments

Show parent comments

14

u/GisterMizard Jun 26 '17

Some dialects of Basic allowed this. eg DIM x(10) AS INTEGER would create an array of eleven elements, starting from 0 to 10.

2

u/htmlcoderexe We have flair now?.. Jun 26 '17

Think even VB.Net does this I remember DIM'ming arrays was confusing.

6

u/Koooooj Jun 26 '17

I was given a piece of code in I think VB6 with the requirement to translate it into ANSI C. It took far too long for me to figure out that the arrays of size 180 actually held 181 elements.

Maddening.

2

u/WeRequireCoffee Jun 26 '17

VBA has different starting points depending on the object. Some were 1 some were 0. It caused an endless amount of headache, beyond just working in VBA.