IF

From Smart Box
Jump to navigation Jump to search

Syntax[edit]

IF condition THEN action ELSE action

Description[edit]

The IF command is used to test for a certain condition and then perform an action. The command can be extended using the word ELSE to perform one action if the condition is true or another if the condition is false.

Examples[edit]

IF SENSOR 1 IS ON THEN FORWARD A
IF SENSOR A IS GREATER THAN 128 THEN SWITCH ON 1 ELSE SWITCH OFF 1

Associated keywords[edit]