Re: New keyword added: continue
Kat wrote:
> c.k.lester wrote:
> > How do you get next/continue or restart with goto (using only 4 letters?)? I
> > don't see a way to iterate using just goto. You'd have to do all sorts of
> > other stuff, methinks, to emulate these easier-to-use terms.
>
> :restart
> for loop = 1 to 12 do
> :retry
> -- code
> if blah then goto restart end if
> if blorg then goto retry end if
> if not x then goto exit end if
> if CK then goto next end if
> if worstcase then goto cleanup&return end if
> -- code
> :next
> end for
> :exit
Ah, I see how next/continue would work there, and retry. But restart-
jumping OUT of a loop and then going back into it- looks like it might
cause interpreter pains (memory leaks, etc.). And jumping out of the loop?
Dunno. Maybe an interpreter modifier can speak to that.
|
Not Categorized, Please Help
|
|