the default of a switch
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Mar 10 02:26:50 AEST 1989
In article <10833 at pasteur.Berkeley.EDU> klatchko at cory.Berkeley.EDU (ron klatchko) writes:
>In a C switch statement, if you have a 'default' part, does it have
>to go below all the 'case' parts?
It's just one of several possible labels in the switch body; the labels
can appear on any statement.
>As a matter of style, I know it should, ...
Not necessarily. There are times when the default case is better dealt
with first.
More information about the Comp.lang.c
mailing list