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 05:07:23 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: "continue/next" for "loop" Supersedes: Date: Mon, 3 Nov 2003 13:07:22 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1067864842 3138 217.17.192.37 (3 Nov 2003 13:07:22 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 3 Nov 2003 13:07:22 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:1970 Date: 2003-11-03T13:07:22+00:00 List-Id: * amado.alves wrote: >> No. I don't know how to invert a complex loop. > > What on Earth are you talking about? The two constructs > > (1) if I mod J = 0 then > goto next; > end if; > Put (I'Img); > <> null; > > (2) if I mod J /= 0 then > Put (I'Img); > end if; > > are clearly equivalent! But both are the result of an oversimplification! outer: loop inner: loop Complex_Actions_1; if First_Condition then Some_Justify_Actions; goto next_outer; end if; Complex_Actions_2; if Second_Condition then Some_Other_Justify_Actions; goto next_outer; end if; Complex_Actions_3; end loop inner; Complex_End_Statments; exit outer when Other_Condition; More_Statments; <> null; end loop outer; I'd like to find a more amazing version of this braindead goto. Please do not assume, that I'm too stupid to invert a condition in a simplified example. IT'S NOT HOMEWORK!