Click here to Skip to main content
15,885,278 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



 
AnswerRe: Not just in computing Pin
JChrisCompton14-Mar-11 11:50
JChrisCompton14-Mar-11 11:50 
GeneralBe practical - do what comes naturally Pin
Kamran Behzad10-Mar-11 12:12
Kamran Behzad10-Mar-11 12:12 
GeneralRe: Be practical - do what comes naturally Pin
Jay Gatsby11-Mar-11 22:56
Jay Gatsby11-Mar-11 22:56 
GeneralRe: Be practical - do what comes naturally Pin
PJ Arends12-Mar-11 6:14
professionalPJ Arends12-Mar-11 6:14 
GeneralRe: Be practical - do what comes naturally Pin
Jay Gatsby14-Mar-11 15:13
Jay Gatsby14-Mar-11 15:13 
GeneralRe: Be practical - do what comes naturally Pin
Mr Nukealizer13-Mar-11 12:54
Mr Nukealizer13-Mar-11 12:54 
GeneralRe: Be practical - do what comes naturally Pin
Jay Gatsby14-Mar-11 15:23
Jay Gatsby14-Mar-11 15:23 
GeneralRe: Be practical - do what comes naturally Pin
JChrisCompton14-Mar-11 12:02
JChrisCompton14-Mar-11 12:02 
You don't need to waste anything.
If we're choosing the array bounds we can choose 1 and still let the compiler assign the first element at offset zero.

An RGB color isn't a array (to my way of thinking) it is three values.
We would gain nothing in clarity by using 1-256 instead of 0-255, so I'd leave that alone.
Same with IP addresses, you just leave it alone because you gain nothing by fooling with it.
(doesn't really even mean anything as a number)

And I'll shut up now Big Grin | :-D
GeneralHumans start counting at 1... Pin
Jacques Bourgeois9-Mar-11 18:53
Jacques Bourgeois9-Mar-11 18:53 
AnswerRe: Humans start counting at 1... Pin
Hans Dietrich9-Mar-11 19:56
mentorHans Dietrich9-Mar-11 19:56 
GeneralRe: Humans start counting at 1... Pin
Marc Clifton11-Mar-11 1:48
mvaMarc Clifton11-Mar-11 1:48 
GeneralRe: Humans start counting at 1... Pin
Hans Dietrich11-Mar-11 1:59
mentorHans Dietrich11-Mar-11 1:59 
GeneralRe: Humans start counting at 1... Pin
Marc Clifton11-Mar-11 2:27
mvaMarc Clifton11-Mar-11 2:27 
GeneralRe: Humans start counting at 1... Pin
Hans Dietrich11-Mar-11 2:40
mentorHans Dietrich11-Mar-11 2:40 
GeneralRe: Humans start counting at 1... Pin
Brett Caswell18-May-11 10:37
Brett Caswell18-May-11 10:37 
GeneralRe: Humans start counting at 1... Pin
PIEBALDconsult10-Mar-11 1:46
mvePIEBALDconsult10-Mar-11 1:46 
GeneralRe: Humans start counting at 1... Pin
Yusuf10-Mar-11 17:27
Yusuf10-Mar-11 17:27 
GeneralRe: Humans start counting at 1... Pin
Ed Nutting11-Mar-11 8:34
Ed Nutting11-Mar-11 8:34 
GeneralRe: Humans start counting at 1... Pin
mirdones10-Mar-11 2:22
mirdones10-Mar-11 2:22 
GeneralRe: Humans start counting at 1... Pin
Tomz_KV10-Mar-11 5:30
Tomz_KV10-Mar-11 5:30 
AnswerRe: Humans start counting at 1... Pin
cruzbdg10-Mar-11 7:14
cruzbdg10-Mar-11 7:14 
GeneralRe: Humans start counting at 1... Pin
Klaus-Werner Konrad13-Mar-11 1:42
Klaus-Werner Konrad13-Mar-11 1:42 
GeneralRe: Humans start counting at 1... Pin
cruzbdg13-Mar-11 4:23
cruzbdg13-Mar-11 4:23 
GeneralRe: Humans start counting at 1... Pin
Emilio Garavaglia13-Mar-11 21:37
Emilio Garavaglia13-Mar-11 21:37 
GeneralRe: Humans start counting at 1... Pin
Nick Polyak11-Mar-11 6:18
mvaNick Polyak11-Mar-11 6:18 

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.