Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!uwmacc!hobbes!root From: root@hobbes.UUCP (John Plocher) Newsgroups: comp.lang.c Subject: Case fall throughs Message-ID: <186@hobbes.UUCP> Date: Fri, 21-Aug-87 05:16:08 EDT Article-I.D.: hobbes.186 Posted: Fri Aug 21 05:16:08 1987 Date-Received: Sat, 22-Aug-87 20:02:07 EDT References: <2201@zeus.TEK.COM> Reply-To: root@hobbes.UUCP (John Plocher) Followup-To: comp.lang.c Organization: U of Wisconsin - Madison Spanish Department Lines: 18 >>> lots of people writing about falling thru a case inside a switch() <<< A trick I use (as seen in some BSD code :-) is: #define when break; case switch( ch ) { case 'A': doa(); when 'B': dob(); when 'C': seenc = 1; /* FALLTHROUGH */ case 'D': doocd( seenc ); } It cleans up the code a bit, I think. -- John Plocher uwvax!geowhiz!uwspan!plocher plocher%uwspan.UUCP@uwvax.CS.WISC.EDU