Mantis LOOP, BREAK & CONTINUE Commands
The LOOP command repeats a block of instructions a fixed number of times or infinitely until terminated by BREAK.
Syntax & Examples
Finite Loop
hello.mantis
1REM Type 5 dots with 300ms delays2LOOP 53 STRING .4 DELAY 3005END_LOOPInfinite Loop with Button BREAK
hello.mantis
1LOOP2 LED_ON3 DELAY 1004 LED_OFF5 DELAY 1006 7 IF BUTTON_PRESSED THEN8 BREAK9 END_IF10END_LOOPRelated Commands
Last updated on