Page 1 of 1

[Solved] Skip & Continue

Posted: Wed Apr 18, 2012 2:54 am
by J. Baker
I would be nice to have a feature "Skip" that does what "Continue" does and then "Continue" sets you back into the loop. Well, as long as the loop isn't over. Quick and dirty example...

Code: Select all

; skip code 2 but jump back in for code 3

Repeat
  
  code 1
  
   Skip
  
    code 2
  
   Continue
  
  code 3
  
Until

Re: Skip & Continue

Posted: Wed Apr 18, 2012 3:35 am
by STARGĂ…TE
thats the keyword IF:ENDIF

Code: Select all

; skip code 2 but jump back in for code 3

Repeat
  
  code 1
  
  If Not Skip
  
    code 2
  
  EndIf
  
  code 3
  
Until 

Re: Skip & Continue

Posted: Wed Apr 18, 2012 4:11 am
by J. Baker
Never thought of "If Not", thanks!

Code: Select all

a = 1
b = 2
c = 3

Debug a

If Not c = 3
  
  Debug b
  
EndIf

Debug c