Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 433 of 909
ENDIF
End IF Statement
APPLICATION: Program execution and flow control
DESCRIPTION: IF formula... ENDIF control block terminator
EXECUTION: Immediate
CONDITIONAL TO: N/A
LIMITATIONS: Requires corresponding IF formula; can be executed only from
within a user program
READ/REPORT: N/A
WRITE: N/A
LANGUAGE ACCESS: N/A
UNITS: N/A
RANGE OF VALUES: N/A
TYPICAL VALUES: N/A
DEFAULT VALUE: N/A
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
Each control block beginning with an IF formula must have a corresponding ENDIF block-exit
statement. Regardless of the execution path through the control block at run time, the
program statement following ENDIF is the common exit point branched to after processing the
IF...ENDIF control block.
NOTE: There can only be one ENDIF statement for each IF statement; every IF
structure must be terminated with an ENDIF statement.
The common exit point following ENDIF is branched to when:
l
Processing a true IF formula clause and encountering ELSEIF, ELSE or ENDIF
l
Processing a true ELSEIF formula and encountering another ELSEIF, ELSE or ENDIF
l
Processing an ELSE clause and encountering ENDIF
l
All IF and ELSEIF formulas are false, and there is no ELSE clause
ENDIF is not a valid terminal command; it is only valid within a user program.
Part 2: Commands: ENDIF