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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,459feef56669b92d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-03 12:11:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: "continue/next" for "loop" Date: Mon, 3 Nov 2003 20:11:09 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <%txpb.5381$qh2.2068@newsread4.news.pas.earthlink.net> NNTP-Posting-Host: belenus.iks-jena.de X-Trace: branwen.iks-jena.de 1067890269 25118 217.17.192.34 (3 Nov 2003 20:11:09 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 3 Nov 2003 20:11:09 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:2009 Date: 2003-11-03T20:11:09+00:00 List-Id: * Jeffrey Carter wrote: > The problem with this discussion is that we don't know what the OP is > trying to do; we only know how he is trying to do it, sort of. What: I'm writing teaching programs for a security class. How : I'm writing readable programs for a security class. > As pointed out elsewhere, the goto's could be converted to "exit Inner;" > and the statements between "end Inner;" and "end Outer;" removed, with no > change in behavior, so we don't really even know how the OP is trying to > do whatever he is trying to do. If we knew what he was trying to achieve, > rather than how he was trying to do it, we might be able to propose an > alternative approach that would avoid his problem. Sorry, that I does not include the source code of the upcomming exercise now. I only noticed a missing language expressivity and asked about my dumbness. > Assuming some way to exit Inner and execute the statements between the > end of Inner and the end of Outer, we have seen a number of ways to > achieve this: goto statements, a Boolean flag, and exceptions. Another > way is to use a dummy loop and exit it: All those ways are possible, but they lose readbility.