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

On the other hand, if you receive an unconstrained array argument (such as S : String, which is an array (Positive range <>) of Character underneath), you are expected to access its elements like this:

    S (S'First), S (S'First + 1), S (S'First + 2), …, S (S'Last)
If you write S (1) etc. instead, the code is less general and will only work for subarrays that start at the first element of the underlying array.

So effectively, indexing is zero-based for most code.



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

Search: