what's the difference between ref and inout in D2?

Trass3r un at known.com
Sat Mar 13 03:11:11 PST 2010

> The compiler prints an error because y is seen as const. So a better  
> question (I don't know the answer) is: what's the purpose of "in" if now  
> function arguments can be const?

Had another look.
"If no storage class is specified, the parameter becomes a mutable copy of  
its argument"
"The in storage class is equivalent to const scope."

But what is scope in this context?

More information about the Digitalmars-d-learn mailing list