IF THEN ELSE
ENDIF
If Then Else
Endif
The “equal to” (EQ) operator is not recommended if value 1 or value 2 represents a real
number. When checking for equality with real numbers, the difference between the numbers is
useful. For example:
OUTPUT
718;"SUB
T,EST,V-ARA,V,ARB;"
Pkices
the
di@?wn.ce
of VARA and V-ARB into
T-EST.
VARA,
VA@
and T-EST are
user-
d&ned
variables.
OUTPUT
718;"ABS
T,EST,T-EST;"
Finds the absolute value of T-EST
OUTPUT
718;"IF
T,EST,LT,.Ol
THEN;"
Does
a
comparison.
OUTPUT
718;"CF
UP;"
OUTPUT
718~"ENDIF~"
9
,
When used within a downloadable program (DLP), the maximum number of IF THEN ELSE
ENDIF
statements that can be nested is 20.
5-238
Programming Commands