Re: Labeled Loops?

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

c.k.lester wrote:
> 
> > while 1 label "top" do
> >     for a = 1 to 10 label "mid" do
> >     end for
> > end while
> > 
> > I do not think you should refer to the for loop as "a", I think when you
> > want
> > a label, you give it one for consistencies sake.
> 
> Can't it be simpler?
> 
> while 1 do "top"
>   for a = 1 to 10 do "mid"
>   end for
> end while
> 
> or, if you absolutely need a "label" statement
> 
> while 1 do ~top
>   for a = 1 to 10 do ~mid
>   end for
> end while

I think for as much as it will be used and for clarity and parsing reasons,
label "abc" would be best, but others may disagree. It especially will not work
after the do. It would be hard to detect if it's the first execution token of the
block or a label. Also, I do not think the label would need to be quoted, it
would just be label top.

--
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