The Sins of K&R

Dave Straker daves at hpopd.HP.COM
Thu Sep 27 19:27:48 AEST 1990


/ hpopd:comp.lang.c / shearer at cis.udel.edu (Rob Shearer) /  4:02 pm  Sep 26, 1990 /
As one of my old C Profs stated:  "If you don't like the way "C" is..
find yourself a new language.... don't take MY "C" away from me..."

If I wanted to do something ... I should be able to do it.  If I made a stupid
mistake, then that is my fault.  "C" gives one the power to do what s/he wants
not what another program (Compiler) regulates...

As for the break from the switch sin...  ( i disagree with most of the sins..
except for 8char variables..  but then again... my compiler allows 32)

I do this alot:

  ch = getch();
  switch (ch) {
    case 'q':
    case 'Q':
    case 27 :
    case 13 :
      exit_menu = 1;
      break;
    case 'a':
      do_a(); break;
   ...etc
  }

And personally I don't care if you want to do switch (upcase(ch)) {  and
have a differetn case for Q,27,13... that is yoru business... but the way
*I* want to do it is up to me...

Robb Shearer
shearer at sol.cis.udel.edu
----------



More information about the Comp.lang.c mailing list