#4. Avoid fall-through in nonempty cases of "switch" statements
Each case label in a switch statement shall be followed by one of the following: Any number of statements, followed by a break instruction. Another case label. A default label. Do not write statements below a case label and without a break instruction after them. It is confusing. A switch statement is a controlled jump. Every time the code execution encounters the keyword switch , it will jump to a different place. The question is where. And the answer is: To the case which is equal to the value of the expression in the switch , if there is one; To the default case, if there isn't one of the above and it exists; To the line after the closing bracket in the switch block, otherwise. In the first case, when the break instruction is reached, the execution flow will jump to the line after the closing bracket in the switch block. Or should I say "if"? The break instruction is actually optional. You could omit ...