immutable

Trass3r un at known.com
Wed Jan 26 13:13:41 PST 2011


>> (readln only uses ~= on buf, it doesn't change the original string)
>
> What?  Why does it take a ref argument then?  If it doesn't overwrite  
> the buffer passed in, there is no point in giving it a buffer.

No I meant it doesn't alter buf's original content, i.e. "hello"
Of course it modifies the array itself via ~= and thus takes it as a ref.
Though it should use 'out' instead I think.


More information about the Digitalmars-d mailing list