Re: Labeled Loops?

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

Matt Lewis wrote:
> 
> c.k.lester wrote:
> > 
> > or maybe:
> > 
> > for a = 1 to 10 do
> >     for b = 1 to 10 do
> >         while 1 do
> >             if b = 3 then exit a end if
> >             if a = 2 then continue b end if
> >         end while
> >     end for
> > end for
> 
> Ok, genius, how do you label a while loop? :P
> 
> Matt

Yeah, using the loop var as the exit or continue target for a "for" statement
makes sense to me. But as you and Jeremy pointed out, it /wouldn't/ make sense in
the context of "while" loops.

Hmm.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu