Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sco!seanf From: seanf@sco.COM (Sean Fagan) Newsgroups: comp.lang.c Subject: Re: Seven Original Sins of K&R (Long) Message-ID: <7984@scolex.sco.COM> Date: 2 Oct 90 23:50:38 GMT References: <12780@sdcc6.ucsd.edu> <4700066@m.cs.uiuc.edu> <1990Sep26.134716.17540@ux1.cso.uiuc.edu> Sender: news@sco.COM Reply-To: seanf (Sean Fagan) Organization: The Santa Cruz Operation, Inc. Lines: 21 In article <1990Sep26.134716.17540@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: >Well, in a C-like language WHERE THE CASES DIDN'T FALL THROUGH >you could write: >>switch(x) { >> case 1: >> for (i=0; i < 10; i++) > goto 2; >> case 2: >> printf("%d ",i); Which, of course, prints out 0 *only*, which is not what the original did at all (although, I will admit, the original wasn't very clever, interesting, novel, obfuscated, but it was rather stupid). -- -----------------+ Sean Eric Fagan | "Never knock on Death's door: ring the bell and seanf@sco.COM | run away! Death really hates that!" uunet!sco!seanf | -- Dr. Mike Stratford (Matt Frewer, "Doctor, Doctor") (408) 458-1422 | Any opinions expressed are my own, not my employers'.