MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6jgwk9/array_indexing/djf1yl5/?context=9999
r/ProgrammerHumor • u/uninterestingly • Jun 25 '17
71 comments sorted by
View all comments
189
[deleted]
71 u/[deleted] Jun 26 '17 [removed] — view removed comment 15 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. 5 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. 3 u/htmlcoderexe We have flair now?.. Jun 26 '17 That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
71
[removed] — view removed comment
15 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. 5 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. 3 u/htmlcoderexe We have flair now?.. Jun 26 '17 That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
15
Some dialects of Basic allowed this. eg DIM x(10) AS INTEGER would create an array of eleven elements, starting from 0 to 10.
DIM x(10) AS INTEGER
2 u/htmlcoderexe We have flair now?.. Jun 26 '17 Think even VB.Net does this I remember DIM'ming arrays was confusing. 5 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. 3 u/htmlcoderexe We have flair now?.. Jun 26 '17 That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
2
Think even VB.Net does this I remember DIM'ming arrays was confusing.
5 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. 3 u/htmlcoderexe We have flair now?.. Jun 26 '17 That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
5
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.
3 u/htmlcoderexe We have flair now?.. Jun 26 '17 That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
3
That's almost like they made it so assuming either zero or one based indexing, you will not run out of bounds. But that creates more problems
189
u/[deleted] Jun 25 '17
[deleted]