Quote:
Originally Posted by j.p.s
About once every 10 years or so I forget to include a break at the end of a new case in a switch block.
|
Now I can blame you: I was going to resist pointing out how switch statements are sketchy because it's perfectly valid to leave out the break, in those weird off-the-wall situations where you want it to fall through. And isn't it the case in C that the value for the case must be a number, int or char? I think in some languages it can be a string or other stuff.