📖⚡EXIT

Break out of a repeated section of code.

Syntax

EXIT


' DO EXIT Example
' DoExit.txt
' Kic8 

  ' This loop will repeat forever, but..
  ' It will EXIT early if pin0 is pressed

DO 

  ' Do something visible
  TOGGLE 0 
  PAUSE 100	

  ' Exit early if pin0 is pressed
  IF PIN0 = 1 THEN EXIT
  
LOOP 
' We have left the loop


Related Commands: