Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!srhqla!demott!kdq From: kdq@demott.COM (Kevin D. Quitt) Newsgroups: comp.lang.c Subject: Re: switch break Message-ID: <677@demott.COM> Date: 5 Oct 90 20:22:39 GMT References: Reply-To: kdq@demott.COM (Kevin D. Quitt) Organization: DeMott Electronics Co., Van Nuys CA Lines: 24 In article enag@ifi.uio.no (Erik Naggum) writes: >In article <1990Oct3.160403.517@Neon.Stanford.EDU> dkeisen@Gang-of-Four.Stanford.EDU (Dave Eisen) writes: > > Besides, it always seems silly to me to have to write break a dozen > times in a long switch to do what in my mind is the canonical > operation. > >May I suggest > > #define Case break; case Perhaps even better (because it won't annoy the maintenance programmer) is to define yourself an editor macro called something like "make-switch-case" which inserts the "case : and "break;" (properly tabified, of course), and leaves your cursor in front of the colon. This does assume you are using a reasonable editor. -- _ Kevin D. Quitt demott!kdq kdq@demott.com DeMott Electronics Co. 14707 Keswick St. Van Nuys, CA 91405-1266 VOICE (818) 988-4975 FAX (818) 997-1190 MODEM (818) 997-4496 PEP last 96.37% of all statistics are made up.