[mercury-users] Array-bounds

Tyson Richard DOWD trd at cs.mu.oz.au
Wed Jun 11 18:46:26 AEST 1997


> 
> >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!
> 
> A third suggestion
>    - make array__from_list/2 nondet and return both

Or make it cc_multi, and return one, but refuse to specify which one ;-)

We're planning on
	- using 0 for all (default) index starting points 
	- renaming array as something else
	- renaming uniq_array as array
	- fixing the documentation for array.m (or rather, whatever it
	  becomes) to clear this up.

	We might add array__from_list/3 as well, but that's not as
	important.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of
     trd at cs.mu.oz.au        #  fur.
http://www.cs.mu.oz.au/~trd #





More information about the users mailing list