Conditional Statements

This subsection discusses the conditional statements IF, THEN, ELSE, GOTO and WHILE.

IF - THEN - ENDIF

N300 IF (expression) THEN

N310 ------------

-- --

-- --

-- --

-- --

N360 ENDIF

N370 ------------

If the expression in N300 is true, the program continues at N310. If the expression is false, the program continues at N370.

In place of an expression, you can use a variable that while not zero is treated as a true expression. (Zero equals false. Any other value equals true).

IF - THEN - ELSE - ENDIF

N400 IF (expression) THEN

N410 ------------

-- --

-- --

-- --

-- --

N440 ELSE

N450 ------------

-- --

-- --

-- --

-- --

N470 ENDIF

N380 ------------

11.4 Advanced Programming

ACU-RITE 3500i

421

Page 447
Image 447
Acu-Rite CNC 3500i user manual Conditional Statements, 421