corner case with labled break

BCS ao at pathlink.com
Fri Jan 25 15:43:58 PST 2008


Reply to Jarrett,

> "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.
> 

OK, I miss phrased the question: should this be in the grammer?




More information about the Digitalmars-d-learn mailing list