comp.lang.ada
 help / color / mirror / Atom feed
From: Stefan Lucks <lucks@th.informatik.uni-mannheim.de>
Subject: Re: "continue/next" for "loop"
Date: Mon, 3 Nov 2003 16:08:43 +0100
Date: 2003-11-03T16:08:43+01:00	[thread overview]
Message-ID: <Pine.LNX.4.44.0311031553140.28031-100000@th.informatik.uni-mannheim.de> (raw)
In-Reply-To: <slrnbqckoa.m1.lutz@taranis.iks-jena.de>

Lutz,

as far as I can see, your program fragment never terminates: There is no
"exit inner" in your code, and thus the"exit outer" is dead code.  Am I
missing something?

On Mon, 3 Nov 2003, Lutz Donnerhacke wrote:

> 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;

-- The next three lines seem to be DEAD CODE:

>   Complex_End_Statments;
>   exit outer when Other_Condition;
>   More_Statments;

>   <<next_outer>> null;
> end loop outer;


If you really want to describe a nonterminating loop, you could delete the
dead code lines and replace both goto statements by "exit inner". My guess
is, this is not what you are looking for. Could this be due to another
oversimplification?

Stefan


-- 
Stefan Lucks      Th. Informatik, Univ. Mannheim, 68131 Mannheim, Germany
            e-mail: lucks@th.informatik.uni-mannheim.de
            home: http://th.informatik.uni-mannheim.de/people/lucks/
------  I  love  the  smell  of  Cryptanalysis  in  the  morning!  ------






  parent reply	other threads:[~2003-11-03 15:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 12:55 "continue/next" for "loop" amado.alves
2003-11-03 13:06 ` Lutz Donnerhacke
2003-11-03 13:07 ` Lutz Donnerhacke
2003-11-03 13:25   ` Peter Hermann
2003-11-03 16:49     ` Robert I. Eachus
2003-11-03 18:21       ` (see below)
2003-11-03 18:52       ` Jeffrey Carter
2003-11-03 20:11         ` Lutz Donnerhacke
2003-11-04  1:23         ` Robert I. Eachus
2003-11-03 13:33   ` James Rogers
2003-11-03 13:46     ` Lutz Donnerhacke
2003-11-03 13:39   ` Dmitry A. Kazakov
2003-11-03 13:54   ` Ole-Hjalmar Kristensen
2003-11-03 14:56     ` Lutz Donnerhacke
2003-11-03 15:08   ` Stefan Lucks [this message]
2003-11-03 15:40     ` Lutz Donnerhacke
2003-11-05 10:36   ` Charles Lindsey
2003-11-05 18:05     ` Lutz Donnerhacke
2003-11-06  9:48     ` Martin Dowie
2003-11-07 14:54       ` Charles Lindsey
2003-11-07 16:24         ` Martin Dowie
2003-11-07 17:34         ` Jeffrey Carter
2003-11-05 14:45   ` Jim Rogers
  -- strict thread matches above, loose matches on Subject: below --
2003-11-03 15:44 amado.alves
2003-11-03 22:12 ` Dmytry Lavrov
2003-11-03 22:27 ` Gautier Write-only
2003-11-03 13:54 amado.alves
2003-11-03 13:45 christoph.grein
2003-11-03 14:23 ` Preben Randhol
2003-11-03 15:01   ` Lutz Donnerhacke
2003-11-03 15:19     ` Dmitry A. Kazakov
2003-11-03 18:33       ` Chad R. Meiners
2003-11-03 15:48     ` Preben Randhol
2003-11-03 18:50     ` Georg Bauhaus
2003-11-03 15:00 ` Lutz Donnerhacke
2003-11-03 10:48 Lutz Donnerhacke
2003-11-03 10:51 ` Preben Randhol
2003-11-03 10:55   ` Preben Randhol
2003-11-03 11:01   ` Lutz Donnerhacke
2003-11-04  3:11 ` Steve
2003-11-05 15:54 ` sk
2003-11-06 15:40   ` Stephen Leake
2003-11-06 18:27     ` sk
2003-11-06 15:39 ` Stephen Leake
replies disabled

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