REPEAT

From Smart Box
Jump to navigation Jump to search

Syntax[edit]

REPEAT

Description[edit]

The REPEAT...UNTIL keywords form a loop. Any instructions within the loop will be repeated until a certain condition occurs. The condition can include multiple conditions with the AND/OR keywords. The loop can be made to continue forever, or until the Escape key is pressed, by using REPEAT...FOREVER.

REPEAT loops can be 'nested' up to 60 deep.

Example[edit]

REPEAT
PRINT SENSOR A
UNTIL SENSOR A IS > 100 OR SENSOR B < 50

Associated keywords[edit]