Seven Original Sins of K&R (Long)
Sean Fagan
seanf at sco.COM
Wed Oct 3 09:50:38 AEST 1990
In article <1990Sep26.134716.17540 at ux1.cso.uiuc.edu> mcdonald at 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 at 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'.
More information about the Comp.lang.c
mailing list