From: lutz@iks-jena.de (Lutz Donnerhacke)
Subject: Re: Trivial Ada question
Date: Thu, 4 Jul 2002 08:28:31 +0000 (UTC)
Date: 2002-07-04T08:28:31+00:00 [thread overview]
Message-ID: <slrnai81pe.og.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: 3D235390.FA14779C@san.rr.com
* 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.
next prev parent reply other threads:[~2002-07-04 8:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-28 9:07 Trivial Ada question Reinert Korsnes
2002-06-28 10:10 ` David C. Hoos, Sr.
2002-06-28 10:54 ` Reinert Korsnes
2002-06-28 10:57 ` Reinert Korsnes
2002-06-28 11:33 ` David C. Hoos, Sr.
2002-06-28 11:44 ` Ted Dennison
2002-06-28 21:38 ` Steven Deller
2002-06-28 12:29 ` Steve Sangwine
2002-07-03 18:59 ` Robert I. Eachus
2002-07-03 19:41 ` Darren New
2002-07-04 8:28 ` Lutz Donnerhacke [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-04 8:59 Grein, Christoph
2002-07-04 9:15 ` Lutz Donnerhacke
2002-07-05 22:25 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox