About switch case statements...

Walter Bright newshound1 at digitalmars.com
Mon Nov 16 02:07:44 PST 2009


Don wrote:
> I frequently use fall-through myself, but having looked at this sample, 
> I bet I don't use it nearly as much as I thought: again, "frequently" 
> probably means "about 1% of the time". But I *know* I've had bugs from 
> leaving out 'break'.

I poked through the optimizer code, gloop.c and gflow.c, and right away 
saw several uses of it.

I used to mark these with /* FALL-THROUGH */, but eventually got tired 
of that (and thought it was ugly) and just switched to using whitespace 
as I mentioned before.



More information about the Digitalmars-d mailing list