On Wed, Jan 21, 2004 at 02:10:02AM +0100, Martin Nilsson (saturator) @ Pike (-) developers forum wrote:
I know that I favor [:-1], i.e. letting [x..y] work as before and having [x:y] do the sizeof(a)-y-1 for you. There were probably some good arguments against this, but I can't remember them.
I don't remember how it was, but it seems logical (to me) that a[x..y] where x and y are negative should be interpreted as sizeof(a)+x and sizeof(a)+y. In fact, it is like this but only for indexes, not ranges.
Regards, /Al