Bill Allombert on Sat, 24 Feb 2018 22:50:38 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: forpart() behavior |
On Sat, Feb 24, 2018 at 04:24:15PM -0500, Max Alekseyev wrote: > Dear Bill, > > Could you please support of partitions of 0 when amin=0 as in > "forpart(p=0,print(p),[0,5],3)"? > It would be very natural to produce a vector of all zeros. this is inconsistent with the documentation: the result must be a vector with 3 non-zero components. > Relatedly, I see nothing wrong in having nmax=0 when nmin=0: > > ? forpart(p=0,print(p),[0,5],[0,0]) > *** at top-level: forpart(p=0,print(p),[0,5],[0,0]) > *** ^--------------------- > *** incorrect type in forpart [expect 0<=min<=max, 0<max] (t_VEC). So you would like it to be the empty Vecsmall ? > (also, I'd change min/max to nmin/nmax in this error message to be consistent > with the documentation). The same code is used to check nmin/nmax and amin/amax. Cheers, Bill.