Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!ogicse!blake!milton!uw-beaver!uw-june!fred.cs.washington.edu!machaffi From: machaffi@fred.cs.washington.edu (Scott MacHaffie) Newsgroups: comp.lang.c Subject: Re: problems/risks due to programming language Message-ID: <10839@june.cs.washington.edu> Date: 23 Feb 90 06:51:09 GMT References: <1597@awdprime.UUCP> <8133@hubcap.clemson.edu> Sender: news@cs.washington.edu Reply-To: machaffi@fred.cs.washington.edu.cs.washington.edu (Scott MacHaffie) Organization: University of Washington, Computer Science, Seattle Lines: 23 In article <8133@hubcap.clemson.edu> billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu writes: > common practice to use break statements by the dozen in order to get > it to behave reasonably. A more sensible design would give the switch > the semantics of the Ada case statement, thereby saving countless lines > of code through the elimination of all those "break" statements. But it would also ADD countless lines of code: ANSI C: switch (x) { case '0': case '1': ... case '9': digit(x); break; } ADA-C: switch (x) { case '0': digit(x); case '1': digit(x); ... case '9': digit(x); } Scott MacHaffie