If : Else : EndIf
DescriptionIf <expression> ... [ElseIf <expression>] ... [Else] ... EndIf
The If structure is used to achieve tests, and/or change the programmes direction, depending on whether the test is true or false. ElseIf optional command is used for any number of additional tests if the previous test was not true. The Else optional command is used to execute a part of code, if all previous tests were false. Any number of If structures may be nested together.Example:
If a=10 Debug "a=10" Else Debug "a<>10" EndIfExample:
If a=10 And b>=10 Or c=20 If b=15 Debug "b=15" Else Debug "Other possibility" EndIf Else Debug "Test failure" EndIf