Difference between revisions of "Shell Commands/EndIf"

From MorphOS Library

< Shell Commands

(Created page with "'''EndIf'''' - Terminates an IF block in a script file. No Template EndIf must be used when an If...")
 
 
Line 1: Line 1:
'''EndIf'''' - Terminates an IF block in a script file.
+
'''EndIf''' - Terminates an IF block in a script file.
  
 
No Template
 
No Template

Latest revision as of 12:21, 3 March 2015

EndIf - Terminates an IF block in a script file.

No Template

EndIf must be used when an If command is used. EndIf is used in scripts at the end of an If block. If the If condition is not true or if the true-condition commands are executed and an Else is encountered, the execution of the script skips to the next EndIf command. Every If statement must be terminated by an EndIf.

NOTE: the EndIf applies to the most recent If or Else command. See also: If, Else for examples using the EndIf command.