Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Optimization of getarrvalue()



On 2016/11/24, at 9:55, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

>> More generally, $a[i,j] with i=$#a+1 is treated specially.
> 
> ??  It's not treated any differently than i=$#a+N for any N >=0, is it?

Suppose we have an array with two elements ($#a = 2)
% a=(one two)
and see what is returned by
% nargs "${(@)a[i,j]}"

For i >= 4 or i <= -3 it returns 1 if j >= i,
while for i=3 (=$#a+1) it returns 0 always.

But, as I said before, if no one is complaining about this we can leave
it as is.



Messages sorted by: Reverse Date, Date, Thread, Author