Using arrays with functions taking ranges

Mu invalid_email at address.int
Fri Dec 14 06:56:44 PST 2012


> It "works" because in theory, all mutable ranges verify the "is 
> output range" trait. However, they are not "sinks", so if you 
> write too much into them, you'll get an out of index exception. 
> Does it work at runtime, and do you get the correct behavior?

 From what I tested, yes it works correctly, but I don't 
understand why.
If put() is used, and the opSlice has a length different from 
zero, how come the data is filled in starting at opSlice's first 
element?

If my questions are becoming trivial, please point me to the 
relevant documentation.
Thank you.


More information about the Digitalmars-d-learn mailing list