Re: [OE vs Phix] assigning atom to a slice is different
- Posted by petelomax Feb 15, 2018
- 1204 views
What I meant by "Really??!": running this on 4.1
sequence s = {1,2,3} ?s[-2]
gives me
C:\Program Files (x86)\Phix\f06.exw:2 subscript value -2 is out of bounds, reading from a sequence of length 3 - in subscript #1 of 's'
and running this
sequence s = {1,2,3} ?s[2..-2]
gives me
C:\Program Files (x86)\Phix\f06.exw:2 slice upper index is less than 0 (-2) - in slice/subscript #1 of 's'
which leads me to believe that OE does not support negative subscripts.
Perhaps you mean something else by "negative terms are accepted if in range" - but I have no idea at all what that could be.