
FACTORYTALK VIEW SITE EDITION USER’S GUIDE
20–20
• • • • •
If the statement is true then the expression returns value1; if the statement is false then the
expression returns value2. Keep in mind that the statement is a mathematical equation and
true means a non-zero value, and false means zero.
Following is an illustration of the if–then–else structure:
Nested if-then-else
It is common to nest an if-then-else structure inside the then or else part of an if-then-
else structure.
Example 1: Nested if-then-else
This expression:
If statement1 Then value1
Else if statement2 Then value2
Else value3
is interpreted in this way:
value2 value1
enter
statement
exit
true
false
Comentarios a estos manuales