[Next] [Prev] [Up] [Top]
9.0 Switch Statements
Use case default and assertions for open sets (ints or chars). (R)
When a switch statement is testing the value of an open ended value, like int or a char, put an explicit default case in the switch. If there is no allowable behavior for the default case, insert an ASSERT or CASEFAILURE macro (see later section).
No Title
[Next] [Prev] [Up] [Top]
Generated with CERN WebMaker