Re: GOTO

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

>I love that construct. It allows exit from any depth of for without any
>knowledge of what that depth is. Now if we can have something of the
>form of
>
>while(A) x = 1 do
>  while(B) y = 2 do
>    while(C) z = 3 do
>
>        ...
>
>       exit(A)
>
>    end while
>  end while
>end while


how about:

    while:A x = 1 do
      while y = 2 do
        while z = 3 do

            ...

           exit:A

        end while
      end while
    end while

--
That way it won't break existing code, and you get a choice of only naming
the loops that you realy need to.

you can then either use:
       while / exit
 or
       while:label / exit:label

I think that seems like quite a tidy way to fix that problem.

-Mark.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu