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,7596cfba54ad3207 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-04 01:28:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.27.83.146!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Trivial Ada question Date: Thu, 4 Jul 2002 08:28:31 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3D234A17.2070508@attbi.com> <3D235390.FA14779C@san.rr.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1025771311 7607 217.17.192.37 (4 Jul 2002 08:28:31 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Thu, 4 Jul 2002 08:28:31 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:26855 Date: 2002-07-04T08:28:31+00:00 List-Id: * Darren New wrote: >"Robert I. Eachus" wrote: >> Notice that a >> compiler might generate identical code for these two examples. What >> makes one right and the other wrong? > >Because the compiler isn't the only one that reads the code? > >"exit when ..." says to leave the innermost loop. >"goto skip" doesn't tell you anything about what "skip" means. So simply write: INCREMENT: for dummy in 1 .. 1 loop for i in a'Range loop exit INCREMENT when condition (a (i)); end loop; n := n + 1; end loop; No 'evil' goto, and a 'telling' label.