|
|
|
|
|
by tom_
318 days ago
|
|
The index of the first element is always 0 plus the index of the first element. This means it sort-of doesn't matter what the index of the first element of the array is - but, viewed another way, it's an excellent argument for 0. Starting at 0 means you don't need to add a constant in the (very common) case of dealing with a subarray that starts at the first element of the containing array. |
|
Pascal, Julia, R, Lua use more natural 1-based, where you call the first element first.