Re: New keyword added: continue
- Posted by Kat <KAT12 at coo?ahs.?et> May 28, 2008
- 816 views
c.k.lester wrote: > > Kat wrote: > > c.k.lester wrote: > > > Maintainability of code is of utmost importance. Using goto is dangerous! > > > :) > > Why are these two blocks so different that you call the 2nd one "dangerous" > > ? > > for loop = 1 to x do > > -- code > > if x = blah then goto next end if > > -- code > > :next > > end for > > > > for loop = 1 to x do > > -- code > > if x = blah then next end if > > -- code > > end for > > Because adding loops therein could be problematic. I do not see how. And frankly, the contrivance i post next i don't understand either....
for loop1 = 1 to 12 do -- code goto next1 -- code for loop2 = 1 to 12 do -- code goto next2 -- code for loop3 = 1 to 12 do -- code goto next3 -- code for loop4 = 1 to 12 do -- code goto next4 -- code for loop5 = 1 to 12 do -- code goto next5 -- code for loop6 = 1 to 12 do -- code goto next6 -- code :next6 end for :next5 end for :next4 end for :next3 end for :next2 end for :next1 end for
No, i don't write like that, but i feel you wanted an extremely good example of stuff taken to bad extremes. But it does proove that you can word search in a text editor to find the target easily, and won't skip a "next" target, because the "goto" targets are plainly labeled above. > > And ye who didn't know you were using code containing "exit", > > how were you "maintaining" that code? > > I'm not maintaining that code (they are in libraries I am including), so > I don't care. :) Good, then you won't care if i use goto. ) Kat