Command: else

Syntax

else <command_block>

Description

Execute a command or block of commands on the failure of a preceding if statement.

Parameters

Switches

None

Notes

This command must be tied to an immediately preceding if, ifyes, ifno or unless statement, otherwise it will be ignored.

Examples

Execute one command.

if ( x = 5 ) !Correct
else !Incorrect

Execute a command block.

if ( x != 5 ) !Wrong
else {
    numeric y = 20
    !Y is now 20
}

See Also

Commands:

if, ifno, ifyes, unless