Re: Exiting multiple loop constructs

new topic     » goto parent     » topic index » view thread      » older message » newer message

Euler German wrote:
> Alas, I still in doubt about "exit" keyword 
> behavior. I'm sorry to insist, but maybe I should exemplify.

I see how it should behave as very different from the diagram the Euler drew. I
see it as ...
 
while 1 label top do
+-> ...
|   for i = 1 to 10 label mid do
|       for j = 1 to 10 label bottom do
|           if j = 2 then
|             exit top -----------------------+
|           elseif j = 7 then                 |
+------------<- continue top                  | 
            end if                            | 
                                              |
            if j = 5 then exit all end if ->+ |
         end for                            | |
    end for                                 | |
end while                                   | |
... <---------------------------------------+ |
... <-----------------------------------------+

 


-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu