|
|
|
|
|
by krukah
452 days ago
|
|
Whenever I explain to someone when or why to use 0-indexing, I like to say: Start from 0 if you are counting boundaries (fenceposts, memory addresses) Start from 1 if you are counting spaces (pages in a book, ordinals) Floors are a case where both make intuitive sense, which is maybe how we ended up with European vs American floor numbering. |
|
* Start from 0 if you are indexing. I.e. you are identifying an item or its position.
* Start from 1 if you are counting. I.e. you are saying how many items there are.
It doesn't matter what it is. I don't know why you think pages in a book are somehow different to memory addresses.