From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.ada:3307 comp.lang.c:26239 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!crdgw1!proton!oplinger From: oplinger@proton.crd.ge.com (B. S. Oplinger) Newsgroups: comp.lang.ada,comp.lang.c Subject: Re: problems/risks due to programming language Message-ID: <5502@crdgw1.crd.ge.com> Date: 23 Feb 90 18:55:58 GMT References: <10811@june.cs.washington.edu% <8126@hubcap.clemson.edu% <10838@june.cs.washington.edu> Sender: news@crdgw1.crd.ge.com Reply-To: oplinger@proton.crd.ge.com (B. S. Oplinger) Followup-To: comp.lang.ada Organization: General Electric Corp. R&D, Schenectady, NY List-Id: Consider the following (slightly modified from the example by Scott MacHaffie): example: switch (x) { /* x is a character, for example */ case '0': number_of_groups ++; case '1': ... case '9': print_digit(x); break; case 'a': ... case 'z': print_lowercase(x); break; } In my example, 0 is just like any other number except that it signals the start of a new group, hence the increment on the number-of-groups counter. This is just the problem with the syntax of the C case (switch) statement. It is designed so that a case may do some work and then 'share' the work of the following case statement. I will submit that this general attitude is found throughout C. Ada, although not a perfect language, is almost always presented with some discussion on software-engineering. I feel that this help promote good work habits. On LINT, I would never program without it (in C). There is no excuse for today's language running on todays machines (hell, even the PC) that LINT checking cannot be done during a compile. I believe that it should also be an option that must be turned off, not on. various random thoughts from: brian oplinger@crd.ge.com <#include standard.disclaimer>