May 31, 2003 label & variable | ||||
---|---|---|---|---|
| ||||
int main() { label: int foo; foo = 0; return foo; } DMD output: file.d(5): undefined identifier foo Should this be? If I put a semicolon after the label, it works. I know the semicolon is required before a } in a block, that makes sense.. but I don't know about this. Just making sure. |
June 01, 2003 Re: label & variable | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vathix | Looks like a bug. Doesn't make sense otherwise "Vathix" <Vathix@dprogramming.com> wrote in message news:bbah4s$1qit$1@digitaldaemon.com... > int main() > { > label: > int foo; > foo = 0; > return foo; > } > > DMD output: file.d(5): undefined identifier foo > > > Should this be? If I put a semicolon after the label, it works. I know the semicolon is required before a } in a block, that makes sense.. but I don't > know about this. Just making sure. > > |
Copyright © 1999-2021 by the D Language Foundation