Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!chinet!john From: john@chinet.UUCP (John Mundt) Newsgroups: comp.lang.c Subject: Re: Case fall throughs Message-ID: <1411@chinet.UUCP> Date: Sat, 15-Aug-87 11:22:32 EDT Article-I.D.: chinet.1411 Posted: Sat Aug 15 11:22:32 1987 Date-Received: Sun, 16-Aug-87 11:35:31 EDT References: <2201@zeus.TEK.COM> Reply-To: john@chinet.UUCP (John Mundt) Organization: Chinet - Public Access Unix Lines: 26 In article <2201@zeus.TEK.COM> dant@tekla (Dan Tilque) writes: > >I (Dan Tilque) say that it's bad programming to have this kind of thing: >> case 'a': >> a = b + count; >> case 'b': >> count += 2; >I expected a number of people to respond saying "I often write these kind of >fall throughs". So far only one person has done so. I admire everyone >else's restraint (or else because of net lag I haven't seen the articles yet). I often write that sort of thing, but I always add a comment to the effect that I meant to do it case 'a' : do_something_wonderful(); /* fallthrough intended */ case 'b' : do_something_marvelous(); break; It saves time and space and is readable as long as the comment remains. -------------------------------------------------------------- John Mundt Teachers' Aide ...ihnp4!chinet!john !teachad![john|fred]