Re: Exiting multiple loop constructs

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

Derek Parnell wrote:
> 
> I see how it should behave as very different from the diagram the Euler drew.
> I see it as ...
>  
> }}}
<eucode>
> 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                                   | |
> ... <---------------------------------------+ |
> ... <-----------------------------------------+
> </eucode>
{{{

>  

I like this. And also, to this effect, there would not need to be a predefined
label "all" as previously stated in one of the messages.

--
Jeremy Cowgar
http://jeremy.cowgar.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu