Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!gem.mps.ohio-state.edu!rpi!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: A perverse switch statement. Summary: It could be worse Message-ID: <1077@crdos1.crd.ge.COM> Date: 13 Oct 89 20:39:44 GMT References: <561@crdos1.crd.ge.COM> <10041@xanth.cs.odu.edu> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: GE Corp R&D Center Lines: 33 In the example below it makes the code even more obscure to add a conditional break within the for in the switch in the for. See below after "case 1" In article , flee@shire.cs.psu.edu (Felix Lee) writes: | main() | { | int i, j = 1; | for (i = 0; i <= 6; ++i) | switch (i) | top: | case 6: { | int k = 3; | case 0: for (; ++k % 3; ++j) { | case 1: printf(" j = %d,", j); if (i == 4) break; | case 2: printf(" k = %d\n", k); | } | case 3: printf("i = %d\n", i); break; | case 4: printf("i = %d\n", i); | case 5: goto top; | } | } Sorry for the big quote, but the code is hard enough to read complete, and I doubt that anyone other than the author would follow the discussion without seeing the source. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon