Conditionally run a single statement.
If <expression> Then statement
Parameters
expression | If the expression is true, the statement is executed. |
Remarks
This version of the If statement is used to execute a single statement without the overhead of an EndIf.
Related
If...Else...EndIf, Select...Case...EndSelect, Switch...EndSwitch
Example
;Terminates script if no command-line arguments
If $CmdLine[0] = 0 Then Exit
;Alternative:
If $CmdLine[0] = 0 Then
Exit
EndIf