Is there ANY chance we can fix the bitwise operator precedence

BCS none at anon.com
Sun Jun 20 21:46:37 PDT 2010


Hello Andrei,

> On 06/20/2010 09:00 PM, bearophile wrote:
> 
>> Michel Fortin:
>> 
>>> But what about the "case 1: ... case 10:" syntax?
>>> 
>>> switch (x) {
>>> case 1: .. case 10:
>>> case 22: .. case 32:
>>> case 52, 64:
>>> doSomething();
>>> break;
>>> default:
>>> whatever();
>>> break;
>>> }
>> Sorry, in my first answer I have a bit partially misunderstood your
>> question.
>> 
>> You can write that like this, but I think this is not compatible with
>> the current syntax (after commas you can of course add a newline):
>> 
>> case 1: .. case 10, case 22: .. case 32, 52, 64:
>> 
>> Otherwise you can keep them splitted (this needs no syntax changes):
>> 
>> case 1: .. case 10: goto case;
>> case 22: .. case 32: goto case;
>> case 52, 64:
>> One of my original proposals was this, that now can not be used: case
>> 1 ... 10, 22 ... 32, 52, 64:
>> 
> The intent is to only require a control flow transfer if there is at
> least one statement after the label.

Anyone who fails to include that special case in there proposal should have 
there hard drive reformatted, with soap.

http://www.youtube.com/watch?v=Ktzt096mlxs


-- 
... <IXOYE><





More information about the Digitalmars-d mailing list