EasyManua.ls Logo

Omron CX-Supervisor - Nested Conditional Statements

Omron CX-Supervisor
164 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Control Statements SECTION 4 CX-Supervisor Script Language
25
IF burner AND fuel > 0 AND rate > 0 THEN
fuel = fuel - rate
ELSE
lift = 0
altitude = 0
ENDIF
Provided that Boolean point 'burner' is ''TRUE'' AND points 'fuel' and 'rate' are
greater in value than 0, then 'fuel' is assigned a new value. Otherwise points
'lift' and 'altitude' are assigned a new value.
References
Refer to chapter 4, Punctuation, Indentation for details on the layout of code.
4-3-2 Nested Conditional Statements
Syntax
IF conditionA THEN
statementblock1
IF conditionB THEN
statementblock3
ENDIF
ELSE
statementblock2
ENDIF
or
IF conditionA THEN
statementblock1
IF conditionB THEN
statementblock3
ELSE
statementblock4
ENDIF
ELSE
statementblock2
ENDIF
or
IF conditionA THEN
statementblock1
ELSEIF conditionB THEN
statementblock3
ENDIF
or
IF conditionA THEN
statementblock1
ELSE
statementblock2
IF conditionB THEN
statementblock3
ELSE
statementblock4
ENDIF
ENDIF
Remarks

Table of Contents

Other manuals for Omron CX-Supervisor

Related product manuals