September 14, 2004 Labels at end of code blocks | ||||
---|---|---|---|---|
| ||||
Probably people already found out about this, but you can't put labels at the end of codeblocks. void main() { goto x; x: // error } void main() { goto x; x: int nothing; } |
September 14, 2004 Re: Labels at end of code blocks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joey Peters | Joey Peters wrote: > Probably people already found out about this, but you can't put labels at the > end of codeblocks. > > void main() { > goto x; > x: // error > } These seem to work, though: void main() { goto x; x: return; } void main() { goto x; x: ; } > > void main() { > goto x; > x: > int nothing; > } -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation