Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: the default of a switch Message-ID: <9828@smoke.BRL.MIL> Date: 9 Mar 89 16:26:50 GMT References: <10833@pasteur.Berkeley.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <10833@pasteur.Berkeley.EDU> klatchko@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.