Negative index range violation

SrMordred patric.dexheimer at gmail.com
Thu Feb 22 00:30:14 UTC 2018


> But with a slice negative indexes are never allowed, even on a 
> pointer.

> youd have to do
> (c-1)[0 .. 1];

Nice!
Thank you both!

In D Slice article it says "You can even use negative indexes!" 
so I thought
that the [-1..x] should work too :)




More information about the Digitalmars-d-learn mailing list