News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by henrikeh on Wednesday January 20, 2021 @12:43PM (#25849382)
Ada is actually not 1-based. Arrays are accessed using an index type which is defined at declaration. It can be any discrete type, including ranges starting at 0 (or 1, or -1, or anything else which fits the domain).
Re:Again on 0-based vs. 1-based indexing by ziml77 on Wednesday January 20, 2021 @01:21PM (#25849910)
Interesting! I looked at a few different sites for examples of arrays in Ada and saw them all starting at 1. But that's a neat feature that it lets you pick the start and end.