digitalmars.D.learn - undefined label
-
Manfred Nowak
(10/10)
Aug 06 2005
- Chris Sauls (12/22) Aug 07 2005 I won't swear to it: but probably because labels are specific to their s...
<code> void main(){ end: ; void f(){ goto end; } } </code> Why is `end' undefined? -manfred
Aug 06 2005
Manfred Nowak wrote:<code> void main(){ end: ; void f(){ goto end; } } </code> Why is `end' undefined?I won't swear to it: but probably because labels are specific to their scope. And/or because functions (even inline ones, technically) are anchored to their frame, so a 'goto' pointing outside that frame won't work. Same reason this doesn't: -- Chris Sauls
Aug 07 2005