Re: Labeled Loops?
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.
|
Not Categorized, Please Help
|
|