If...Then...ElseIf statement (LotusScript® Language)

Conditionally executes a block of statements, depending on the value of one or more expressions.


If condition Then


[ ElseIf condition Then

statements ]


[ Else

statements ]

End If



Any numeric expression. A value of 0 is interpreted as FALSE, and any other value is interpreted as TRUE.


Statements that are executed if condition is TRUE.


LotusScript® executes the statements following the Then keyword for the first condition whose value is TRUE. It evaluates an ElseIf condition if the preceding condition is FALSE. If none of the conditions is TRUE, LotusScript® executes the statements following the Else keyword. Execution continues with the first statement following the End If statement.

You can include any number of ElseIf expressions in the block.

You can include an If statement within an If statement. Each If block must be terminated by an End If.