LOTUSSCRIPT LANGUAGE


If...GoTo statement
Example

Conditionally executes one or more statements or transfers control to a labeled statement, depending on the value of an expression.

Syntax

If condition GoTo label [ Else [ statements ] ]

Elements

condition


label
statements
Usage

An If...GoTo statement must occupy a single line of code. Line continuation with the underscore character ( _ ) is allowed.

If condition is TRUE, LotusScript executes the GoTo statement, transferring control to the statement following the label label. If condition is FALSE, LotusScript executes the block of statements in the Else clause. If there is no Else clause, execution continues with the next statement.

You can't use an If...GoTo statement to transfer control into or out of a procedure, and you can't use it at the module level.

Language cross-reference

@If function in formula language

@V2If function in formula language

@Failure function in formula language

Example
See Also