Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: