digitalmars.D.bugs - "out" always works as "inout"?
- Nick <Nick_member pathlink.com> Jul 20 2004
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Jul 20 2004
- "Walter" <newshound digitalmars.com> Jul 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
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> 