digitalmars.D.bugs - "out" always works as "inout"?
- Nick (11/11) Jul 20 2004 I've understood the documentation correctly, using "out" in a parameter
- Jarrett Billingsley (2/2) Jul 20 2004 derek parnell on the main D messageboard had the same problem. i swear ...
- Walter (1/1) Jul 20 2004 It's a known bug, and it'll be fixed in the next update. -Walter
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
Jul 20 2004
derek parnell on the main D messageboard had the same problem. i swear out worked correctly in 0.94.
Jul 20 2004
It's a known bug, and it'll be fixed in the next update. -Walter
Jul 20 2004









"Jarrett Billingsley" <kb3ctd2 yahoo.com> 