corner case with labled break

Jarrett Billingsley kb3ctd2 at yahoo.com
Fri Jan 25 15:31:41 PST 2008


"BCS" <ao at pathlink.com> wrote in message 
news:55391cb32812d8ca2d7783d0f566 at news.digitalmars.com...
> should this work? (it doesn't now)
>
> |void main()
> |{
> | foo: while(true)
> | break foo;   // works
> |
> | switch(6)
> | {
> | case 5:
> | while(true)
> | break case 5;   // fails
> |
> | case 6:
> | goto case 5;  // works
> |
> | }
> |}

It's not in the grammar at all, so I'm not surprised that it doesn't.  It's 
a tiny feature though. 




More information about the Digitalmars-d-learn mailing list