Click here to Skip to main content
16,013,581 members

Survey Results

Should array indexing start at 0 or 1?   [Edit]

Survey period: 7 Mar 2011 to 14 Mar 2011

Old school VB devs and old school C devs know the answer. What's your feeling in this modern, enlightened era?

OptionVotes% 
01,11587.93
115312.07



 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Pritesh Aryan7-Mar-11 18:09
Pritesh Aryan7-Mar-11 18:09 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Indivara8-Mar-11 3:05
professionalIndivara8-Mar-11 3:05 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Bassam Abdul-Baki7-Mar-11 1:13
professionalBassam Abdul-Baki7-Mar-11 1:13 
GeneralMessage Removed Pin
7-Mar-11 4:36
professionalN_tro_P7-Mar-11 4:36 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Bassam Abdul-Baki7-Mar-11 10:55
professionalBassam Abdul-Baki7-Mar-11 10:55 
GeneralRe: It should start from 0 in a high-level programming language. Pin
RedSonja7-Mar-11 20:03
RedSonja7-Mar-11 20:03 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Nemanja Trifunovic7-Mar-11 4:39
Nemanja Trifunovic7-Mar-11 4:39 
GeneralRe: It should start from 0 in a high-level programming language. Pin
Thomas Freudenberg8-Mar-11 0:26
Thomas Freudenberg8-Mar-11 0:26 
To be fair, you could write
for (int index = 1; index <= array.Length; index++)


(but I prefer 0-based arrays too)
Regards
Thomas


Disclaimer:
Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.

GeneralIt should start from 1 in a high-level programming language. PinPopular
nmarcel6-Mar-11 18:30
nmarcel6-Mar-11 18:30 
GeneralRe: It should start from 1 in a high-level programming language. Pin
That's Aragon6-Mar-11 18:37
That's Aragon6-Mar-11 18:37 
GeneralRe: It should start from 1 in a high-level programming language. PinPopular
Andrew Torrance7-Mar-11 2:19
Andrew Torrance7-Mar-11 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.