3 ms·
Dijkstra mentions Mesa offering all four options. Mesa's interval notation was [0..5] 0,1,2,3,4,5 (0..5) 1,2,3,4 [0..5) 0,1,2,3,4 (0..5]
by Animats 10y ago
Dijkstra mentions Mesa offering all four options.
Mesa's interval notation was
[0..5] 0,1,2,3,4,5
(0..5) 1,2,3,4
[0..5) 0,1,2,3,4
(0..5] 1,2,3,4,5
This reflects the concept of closed and open intervals in mathematics. It might have been useful when porting FORTRAN programs to Mesa. In FORTRAN, arrays start from 1. Pascal required a range in the declaration. When C started consistently from 0, that was considered radical.
For programming, as Dijkstra mentions, a consistent start from zero seemed to be helpful.