inout/out static array parameter

Tom Tom_member at pathlink.com
Tue Feb 21 19:02:22 PST 2006


Why is this illegal? Where does the documentation states this?
Does it have something to do with the matter that int[10] is allocated onto the
stack? Sometimes I think D losses its abstraction capability when one has to be
concerned about this kind of differences.

5# void f(inout int[10] x) 
6# { 
7# 	x[0..$] = 99; 
8# }

test.d(5): cannot have out or inout parameter of type int[10]

(dmd.147 Win)

Thanks,

Tom;



More information about the Digitalmars-d mailing list