If

<< Click to Display Table of Contents >>

Navigation:  Basic concepts > Statements >

If

Syntax:

If <BoolExpression>

  Then <Statements>

 [ [Elsif <BoolExpression>

          Then <Statements>]

  Else <Statements> ]

End

This is the usual conditional test. The requirement for End prevents bugs due to the "dangling else" problem. The Elsif clause (as many as you need) is optional as is the Else clause.