Click here to Skip to main content
15,915,044 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
pkfox19-Sep-13 20:52
professionalpkfox19-Sep-13 20:52 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
ExcellentOrg19-Sep-13 21:14
ExcellentOrg19-Sep-13 21:14 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
daniel_bingamon20-Sep-13 0:59
daniel_bingamon20-Sep-13 0:59 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts20-Sep-13 1:36
kalberts20-Sep-13 1:36 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Sentenryu20-Sep-13 2:24
Sentenryu20-Sep-13 2:24 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts20-Sep-13 3:22
kalberts20-Sep-13 3:22 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Sentenryu20-Sep-13 3:41
Sentenryu20-Sep-13 3:41 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts20-Sep-13 4:12
kalberts20-Sep-13 4:12 
Hey, I didn't intend this to describe some real-world archive where the information to be handled is defined in a requirements specification... It could be anything. So the array elements could be anything. My only assumption was that the year is the top level discriminator; nothing more. I can imagine a lot of information that is grouped by year!

The reason for using WW2 as an example was to illustrate a case where the start and end years are definite. Appearently, "1960 to 2020" made people want to generalize for the sake of generalizing, so I had to pull something off the top of my head where such generalization would be completely misplaced.

A continuos range of index values isn't "sparse" by not starting from 0 (or 1)! The range 1960 to 2020 is as dense as 0 to 60; it gives no reason to employ hashing. Hashing is generally a bad idea if you need to traverse your data in sequential order in the most efficient way.

Maybe I would be able to relate to your question about classified files etc. if I actually had been working on such a project, but I haven't. My example was only for illustrating the concept of arbitrary index limits. Considering classified information and access control is a completely different question.
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
englebart20-Sep-13 3:18
professionalenglebart20-Sep-13 3:18 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts20-Sep-13 3:25
kalberts20-Sep-13 3:25 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
PIEBALDconsult23-Sep-13 4:03
mvePIEBALDconsult23-Sep-13 4:03 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Michael Waters23-Sep-13 5:39
Michael Waters23-Sep-13 5:39 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts24-Sep-13 23:05
kalberts24-Sep-13 23:05 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Michael Waters25-Sep-13 3:28
Michael Waters25-Sep-13 3:28 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
englebart20-Sep-13 3:34
professionalenglebart20-Sep-13 3:34 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
etkid8420-Sep-13 4:03
etkid8420-Sep-13 4:03 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Michael Waters23-Sep-13 5:41
Michael Waters23-Sep-13 5:41 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts25-Sep-13 1:25
kalberts25-Sep-13 1:25 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
Michael Waters25-Sep-13 3:37
Michael Waters25-Sep-13 3:37 
AnswerRe: What to call array indexing starting at 0 vs. 1 ? Pin
RefugeeFromSlashDot20-Sep-13 5:21
RefugeeFromSlashDot20-Sep-13 5:21 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
kalberts25-Sep-13 0:44
kalberts25-Sep-13 0:44 
GeneralRe: What to call array indexing starting at 0 vs. 1 ? Pin
RefugeeFromSlashDot25-Sep-13 2:56
RefugeeFromSlashDot25-Sep-13 2:56 
GeneralFor the racing car fans Pin
vonb19-Sep-13 3:17
vonb19-Sep-13 3:17 
GeneralRe: For the racing car fans PinPopular
PB 369,78319-Sep-13 3:26
PB 369,78319-Sep-13 3:26 
GeneralRe: For the racing car fans Pin
CBadger19-Sep-13 4:29
professionalCBadger19-Sep-13 4:29 

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.