Path: utzoo!utgpu!watserv1!watmath!att!drutx!rrg From: rrg@drutx.ATT.COM (GilmanRR) Newsgroups: comp.lang.misc Subject: Re: problems/risks due to programming language, stories requested Summary: fallthrough (personal favorite) Message-ID: <5260@drutx.ATT.COM> Date: 17 Mar 90 00:49:44 GMT References: <1004@micropen> <8218@hubcap.clemson.edu> <1771@awdprime.UUCP> <879@enea.se> Organization: AT&T, Denver, CO Lines: 23 My favorite example (in real production code) of a switch statement: switch (type) { case A: /* A, etc. are #define'd */ ... /* do stuff for type A */ /* FALLTHROUGH */ case B: if (type == B) { .... /* do B-only stuff */ } /* FALLTHROUGH */ case C: ... /* do ABC stuff /* break; default: ... } Bob Gilman AT&T Bell Labs Denver CO