Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!aglew From: aglew@ccvaxa.UUCP Newsgroups: net.lang.c Subject: Re: A good use of a bad feature Message-ID: <2600050@ccvaxa> Date: Sat, 10-May-86 16:19:00 EDT Article-I.D.: ccvaxa.2600050 Posted: Sat May 10 16:19:00 1986 Date-Received: Sun, 25-May-86 14:16:56 EDT References: <1853@mit-eddie.MIT.EDU> Lines: 38 Nf-ID: #R:mit-eddie.MIT.EDU:1853:ccvaxa:2600050:000:1093 Nf-From: ccvaxa.UUCP!aglew May 10 15:19:00 1986 >/* Written 10:49 am May 4, 1986 by root@icst-cmr in net.lang.c */ >You will find much disagreement on that point, I'm afraid. Fall thru is >more flexible. You can always break, but often cases are related so that >a particular case requires a superset of another case. It is to DMR's >credit that he realized this feature. I sure wouldn't have thought of it. >/* End of text from net.lang.c */ And what do you do if you have more than one case which is a superset of another? Eg. case A case B \ / \ / case C | | break Dup code or use gotos. The worst is when people use combinations of gotos and fall-through: case A: ... goto case_C; case B: ... /* fall through */ case C: case_C: ... break; There should be one way to do things. Special case constructs should only be used if they crop up frequently. I don't think fall through qualifies. Andy "Krazy" Glew. Gould CSD-Urbana. USEnet: ihnp4!uiucdcs!ccvaxa!aglew 1101 E. University, Urbana, IL 61801 ARPAnet: aglew@gswd-vms