Inside the switch statement

grauzone none at example.net
Tue Jun 9 09:40:52 PDT 2009


BCS wrote:
> Hello grauzone,
> 
>>> http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c
>>>
>> Many people (even Brian Kernighan?) have said that the worst feature
>> of C is that switches don't break automatically before each case
>> label.
>>
>> Oh god, that's from 1984, and even today we're struggling with this
>> bullshit in the most modern dialect of C, D.
>>
> 
> I'm sorry, you don't have my sympathy on this one. There are to many 
> place I've used fall throught to chuck it out.

What kind of fall-throughs were these?

A:

case value1:
case value2:
case valueN:
	code1();
	break;

B:

case value1:
	code1();
case value2:
	code2();
	break;


More information about the Digitalmars-d-learn mailing list