Or Else Operator

Returns “true” if one or more Boolean expressions are true, but stops after the first true expression.

Syntax

expression_1 Or Else expression_2

Parts

expression_1
An expression with the type Boolean or that can change to Boolean.
expression_2
An expression of a type compatible with expression_1.

Instructions

Or Else is almost the same as the operator Or. They are different when expression_1 is true. When this occurs, expression_2 is not evaluated. This is correct because if one expression is true, then the result is always true. This is known as short-circuit evaluation.

Truth table for expression_1 Or Else expression_2
If expression_1 is And expression_2 is Then the result is
Truenot evaluatedTrue
FalseTrueTrue
FalseFalseFalse

Examples

TODO

See also