User Guide

or 615
or
Usage
-- Lingo syntax
logicalExpression1 or logicalExpression2
// JavaScript syntax
logicalExpression1 || logicalExpression2
Description
Operator; performs a logical OR operation on two or more logical expressions to determine
whether any expression is
TRUE.
This is a logical operator with a precedence level of 4.
Example
This statement indicates in the Message window whether at least one of the expressions 1 < 2 and
1 > 2 is
TRUE:
-- Lingo syntax
put((1 < 2) or (1 > 2))
// JavaScript syntax
put((1 < 2) || (1 > 2));
Because the first expression is TRUE, the result is 1, which is the numerical equivalent of TRUE.
This Lingo checks whether the content of the field cast member named State is either AK or HI
and displays an alert if it is:
-- Lingo syntax
if member("State").text = "AK" or member("State").text = "HI" then
_player.alert("You're off the map!")
end if
// JavaScript syntax
if (member("State").text == "AK" || member("State").text == "HI") {
_player.alert("You’re off the map!");
}
See also
and, not