Thread overview
"out" always works as "inout"?
Jul 20, 2004
Nick
Jul 21, 2004
Walter
July 20, 2004
I've understood the documentation correctly, using "out" in a parameter declaration should "blank out" the variable, but this doesn't seem to work:

void main()
{
void func(out int i) {}

int i = 10;
printf("%d\n", i);
func(i);		// i should be set to 0, but is not
printf("%d, should be %d\n", i, int.init);
}

Nick


July 21, 2004
derek parnell on the main D messageboard had the same problem.  i swear out worked correctly in 0.94.


July 21, 2004
It's a known bug, and it'll be fixed in the next update. -Walter