[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

This site was grabbed using the TRIAL version of Grab-a-Site. This message does not appear on a licensed copy of Grab-a-Site.