Re: New keyword added: continue
- Posted by Kat <KAT12 at coo?a?s.net> May 12, 2008
- 783 views
Why? Here's how you use one keyword instead of six:
--repeat until :repeat x -= 1 if x > 12 then goto repeat end if -- case atom fred, a, d fred = 45 a = 1 d = 44 goto x puts(1,x&" is not covered") goto caseend :1 puts(1,"it's 1!") goto caseend :34 puts(1,"wow, 34!") :"Sam" puts(1,"you got Sam!" goto caseend :a+d puts(1,"Yep, fred is 45!") goto caseend :caseend -- continue, retry, restart, and next :restart for loop = 1 to 12 do :retry -- code if test = failed then goto retry end if if thistest = failed then goto restart end if if bored = true then goto next end if if done then goto demoend end if -- code :next end for :demoend
You know exactly where each "goto" lands, each :target can be in your own native language, and OOEU prooves it can be done. It's ONE word. It's so SIMPLE. Kat