Re: Good Use of GOTO
- Posted by Lucius L. Hilley III <euphoria at u??mar.com> Jun 06, 2008
- 821 views
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?). We need goto to be able to jump out of a loop early. Redundant if statements are such a pain. Lets add exit to avoid adding goto. We want need goto to leap back to the beginning of a for loop and keep the index value the same. We are now trying another approach, we changed something else. Lets add retry to avoid adding goto. We want need goto in order to proceed through a loop without executing any following code within the loop before starting the next iteration. Lets add continue to avoid adding goto. MORE keywords are CLEANER than one easy to understand KEYWORD? Lucius L. Hilley III - Unkmar