On Wed, Jan 4, 2012 at 4:40 PM, Jesse Phillips <[email protected]> wrote: > > Out parameters are initialized. The declaration you want is: > > bool fun(double theta, A a = A.init, B b = B.init, C c = C.init){ /* ... */ > } >
In my case A, B, and C are structs, so that works the way I wanted it. Nice!
It doesn't, however, work with primitive types:
void fun2(int a, out int b = int.init){ }
int a = 32;
fun2(a); Error: constant 0 is not an lvalue
oh well.
