Re: How to "continue" in nested do-while-loop?




"Richard Heathfield" <rjh@xxxxxxxxxxxxxxx> wrote in message
news:f72dnYWgg9JSdR_YRVnyiQA@xxxxxxxxx
Jan Schmidt said:

Hi,

in a nested do-while-loop structure I would like to "continue" the outer
loop. With goto this should be no problem in while-loops. However, for
do-while I cannot get it to work

do
{
foo();
bar = 0;
while(!bar && baz)
{
quux();

/* At this point, either you want to carry on
processing this loop, or you don't. Set bar accordingly. */

if(!bar)
{
quuy();
}
}
if(!bar)
{
quuz();
}
} while(ribbit);

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.

Amazing that on clc it took this long for someone to post
the effective answer - Why not write the code correctly
instead of hack it to work?


.



Relevant Pages

  • Re: Problem with Image display on separate window
    ... IE7 puts an address bar at the top of the picture below the title bar. ... I am curious as to why the large image loads quick after the first time it ... is when you are in a loop (while loop or for loop of x iterations to ... is there some type of hide window function? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to "continue" in nested do-while-loop?
    ... With goto this should be no problem in while-loops. ... do-while I cannot get it to work ... processing this loop, or you don't. ... Set bar accordingly. ...
    (comp.lang.c)
  • Re: How to "continue" in nested do-while-loop?
    ... With goto this should be no problem in while-loops. ... do-while I cannot get it to work ... processing this loop, or you don't. ... Set bar accordingly. ...
    (comp.lang.c)
  • RE: Do Loop or If Then
    ... If ActiveCell.Row> 6002 Then Exit Do ... Loop Until ActiveCell.Value>= 1 ... ' Calculate time between engine movement and 1 bar ...
    (microsoft.public.excel.programming)
  • Re: LEAVE
    ... : FOO ... A DO B IF LEAVE THEN C IF LEAVE THEN D LOOP E; ... BAR DO B IF UNLOOP EXIT THEN C IF UNLOOP EXIT THEN D LOOP; ...
    (comp.lang.forth)