What to call array indexing starting at 0 vs. 1 ?
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
I believe the correct terms are right and wrong.
speramus in juniperus
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
Zero based or one based.
Chill _Maxxx_
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
Zero based or one based.
Chill _Maxxx_
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easierat least thats what the .NET Framework uses in its documentation ;P
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
"proper" and "annoying" respectively.
The only instant messaging I do involves my middle finger.
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
Annoingly Excel or .NET...
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
-
"proper" and "annoying" respectively.
The only instant messaging I do involves my middle finger.
Like showing the ring finger instead of the middle finger :laugh:
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
Maximilien wrote:
"0-based array" and "1 based array"
That's about right.
Maximilien wrote:
1 (e.g. pascal)
Pascal allows you to specify the range. And with OOP you can define a class that implements arbitrary indexing, e.g.
new MyArray ( -5 , 10 )
. -
Yin and Yang :-O
-
Yin and Yang :-O
-
at least thats what the .NET Framework uses in its documentation ;P
Wimp. Real coders don't read documentation. ;P
Chill _Maxxx_
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
In a separate millenium I wrote a 1 based C++ string class - I think that was the best argument for zero based code I've ever seen.
Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
-
Wimp. Real coders don't read documentation. ;P
Chill _Maxxx_
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easierI only have seen that in the Intellisense popup of some .NET function. Intellisense is all the documentation that I need. :laugh:
-
Yin and Yang :-O
-
It's an imperfect world, screws fall out all the time.
-
I only have seen that in the Intellisense popup of some .NET function. Intellisense is all the documentation that I need. :laugh:
Meh! Real men code with edlin.
speramus in juniperus
-
Meh! Real men code with edlin.
speramus in juniperus
Emacs. /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.
I'd rather be phishing!
Maximilien wrote:
Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ?
The term is "array", and they start at index 0. There's a difference when talking about strings, not arrays.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]