Array-bounds
Henk Vandecasteele
henkv at cs.kuleuven.ac.be
Tue Jun 10 20:37:35 AEST 1997
hi,
I always wonder which array bounds are natural to logicians
(starting from 0 or from 1).
We already had a discussion on that.
The conclusion was that there was no straightforward answer.
The user should have the choice?
Today I found a remarkable combination in the mercury library:
array__from_list/2 returns an array which starts from 1
uniq_array__from_list/2 returns an array which starts from 0
As the documentation of array__from_list/2 does not tell that it starts
from 1, I assumed it started from 0. You can imagine the consequences!
My suggestions:
- Adapt the documentation of array__from_list/2.
- Add an array__from_list/3 which has an argument to specify
where the array starts!
Regards,
Henk
More information about the users
mailing list