News for hackers. Stuff that matters.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by DougBTX on Saturday August 18, 2018 @03:12PM (#17790061)
Following the principle that array indexes are “between” the elements, the bottom of the first step is 0, and the top of the first step is 1. Then the ground, which is equal in elevation to the bottom of the first step, is at 0, and the floor after the last step is N, one past the index of the last valid step, N-1.

Half open zero based ranges are quite satisfying :-)

There are no comments on this comment yet.