comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: Help with Exceptions!
Date: 1996/05/14
Date: 1996-05-14T00:00:00+00:00	[thread overview]
Message-ID: <4n9uas$pq0@newsbf02.news.aol.com> (raw)
In-Reply-To: EACHUS.96May13172506@spectre.mitre.org


eachus@spectre.mitre.org (Robert I. Eachus) writes:
>    <<label>> ...
>              for I in ... loop
>                ...
>                if entry_type = continue
>                then
>                  ...
>                  goto label; 
>                end if;
>              end loop;
>... this could be "fixed" with a recursive call.
     I'm not saying that the following is any "better" than the above, but
here's how I would do it, without recursion.
Retry : Boolean := True;
I     : ...     := ...;
...
while Retry loop
   Retry := False;
   while I < ... and not Retry loop
      ...
      if entry_type = continue then
         ...
         Retry := True;
      end if;
      I := ...; -- e.g., I + 1 or ...'Succ(I)
   end loop;
end loop;
     Again, I'm not saying this is better, but my point is that you could
"fix" the goto without recursion.
- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor
     How many Americans does it take to change a light bulb?  Five.  One
to turn the bulb, and four to file an Environmental Impact Statement.




  reply	other threads:[~1996-05-14  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-07  0:00 Help with Exceptions! Robert Gelb
1996-05-07  0:00 ` Vincent Smeets
1996-05-07  0:00 ` Steve Howard
1996-05-07  0:00   ` Robert Dewar
     [not found]   ` <4mqio5$a8b@news.sanders.lockheed.com>
1996-05-09  0:00     ` Robert L. Spooner, AD3K
1996-05-10  0:00   ` Jon S Anthony
1996-05-10  0:00     ` Robert A Duff
1996-05-07  0:00 ` John Herro
1996-05-14  0:00 ` Michel Gauthier
1996-05-14  0:00   ` Robert A Duff
1996-05-15  0:00     ` Norman H. Cohen
1996-05-15  0:00       ` Robert A Duff
     [not found] ` <318F94D9.35AB@io.com>
1996-05-10  0:00   ` George F.Rice
1996-05-13  0:00     ` Dave Jones
1996-05-13  0:00   ` Robert I. Eachus
1996-05-14  0:00     ` John Herro [this message]
1996-05-14  0:00       ` Robert I. Eachus
1996-05-14  0:00   ` Theodore E. Dennison
1996-05-14  0:00     ` Robert A Duff
1996-05-15  0:00 ` Michel Gauthier
1996-05-16  0:00 ` Jon S Anthony
1996-05-16  0:00   ` Robert A Duff
1996-05-16  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-05-09  0:00 tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox