IF condition THEN
ELSEIF condition THEN
Condition - The condition which will cause the associated code commands to be executed or not.
Code - Command statements which will be executed dependant upon the evaluation of the condition.
The endif command is used to terminate a multiple line if command. The command can either be specified as a single word, 'endif' or as two separate words, 'end if'.
For more detailed information and further examples, please see the if command page.
Flash an LED when a button is pressed
Continually check C.0 to see if it is high - if it is, turn B.1 on for 5 seconds
Submit Your Own Code!
You must be logged in to submit code examples. Login now.