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 autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hprnd!hprmokg!tom From: tom@hprmokg.HP.COM (Thomas Vachuska) Newsgroups: comp.lang.ada Subject: Re: problems/risks due to programming language, stories requested Message-ID: <30160002@hprmokg.HP.COM> Date: 23 Feb 90 18:11:23 GMT References: <9790@medusa.cs.purdue.edu> Organization: HP Networked Computer Mfg. Operation List-Id: Maybe I am missing the point here, but to the best of my knowledge Ada "exit" statement is allowed only within a "named loop|loop" statement (unless it appears in a "subprogram|package|generic|task|accept body" which is enclosed within that "loop" statement, to be precise). And as far as I know similar restrictions apply for the use of the C "break" statement which terminates the execution of either the "while|do|for" or "switch" statement. Neither of these are to abandon execution of an "if" statement block. I would agree that it is easier to get in trouble in the following situation in C which does not have a counterpart in Ada since Ada's "exit" exits ONLY the "loop" statement. switch (trouble) { case PROGRAMMER_SCREW_UP: for (;;) { break; /* intended for exiting the "switch", BUT... */ } case ... . . } Thomas Vachuska (-- Ada Addict)