Re: Good Use of GOTO
- Posted by Kat <KAT12 at coos?hs.net> Jun 06, 2008
- 811 views
Chris Bensler wrote: > > c.k.lester wrote: > > > > Lucius L. Hilley III wrote: > > > > > for t=1 to 10 next > > > if a then > > > goto "t_continue" > > > else > > > -- code > > > end if > > > label "t_continue" > > > end for > > > > Good job, Lucius! :) This solidifies my opinion that GOTO is unnecessary. > > The example just using 'continue' is cleaner, and it's probably faster > > without GOTO (one less jump?). > > You dont' even need continue. > > }}} <eucode> > for t = 1 to 10 do > if not a then > -- code > end for > end for > </eucode> {{{ Fine bit of code, Chris, but not what CK asked for. CK said you can't use a goto in a for loop that increments the loop var and acts like a continue. Luc gave it to CK, and CK hasn't corrected himself yet. Kat