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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!crdgw1!jupiter!kassover From: kassover@jupiter.crd.ge.com (David Kassover) Newsgroups: comp.lang.ada Subject: Re: problems/risks due to programming language Message-ID: <5520@crdgw1.crd.ge.com> Date: 25 Feb 90 20:23:13 GMT References: <10811@june.cs.washington.edu> <8126@hubcap.clemson.edu> <5498@crdgw1.crd.ge.com> Sender: news@crdgw1.crd.ge.com Organization: Aule-Tek, Inc. List-Id: In article <5498@crdgw1.crd.ge.com> hammondr@sunroof.crd.ge.com (Richard A Hammond) writes: ... >I agree with Bill that Ada would minimize the chance of getting an "exit" >in there, since it doesn't need one at the end of each case. >However, it wouldn't PREVENT it, since the Ada and C fragments are both >not only legal, but sensible. Way back in the mists of time, before FORTRAN77 and Ratfor were inflicted on us, I was doing computer programming with a fortran preprocessor variously called FLEXTRAN, FLEX, FLECS, etc. One of the features of this preprocessor was that it provided 4 varieties of case statement, as well as an IF-THEN-ELSE construct. All four had optional catchall statements. We had the SELECT and the CONDITIONAL. SELECT was similar to Ada Case. One selected an expression, and specified cases for each. CONDITIONAL was more like an IF-THEN-ELSE, and was not strictly necessary. That is, one entered the conditional, and executed the code associated with the first of a list of conditions that was true. There were also the ENTER SELECT and the ENTER CONDITIONAL. Exactly like SELECT and CONDITIONAL, except that once a case was selected, control passed through to all subsequent cases, including a catchall if present. Similar to the C Switch. I have no idea why someone went to the trouble of providing more than a functionally complete set of control structures, but it was very handy, *IF* the programmer didn't choose the wrong one by mistake, or got confused as to which one he wanted. Oh, well, nothing has changed... By the way, if anyone could suggest a way to make a preprocessor whose output would be legal FORTRAN *and* a correct program, if the fortran language did not have an ASSIGNED GOTO construct, I would appreciate it. My mind doesn't work that way...