contains
611
and
Usage
-- Lingo syntax
logicalExpression1
and
logicalExpression2
// JavaScript syntax
logicalExpression1
&&
logicalExpression2
Description
Logical operator; determines whether both
logicalExpression1
and
logicalExpression2
are
TRUE
(1), or whether either or both expressions are
FALSE
(0).
The precedence level of this logical operator is 4.
Example
This statement determines whether both logical expressions are
TRUE
and displays the result in the
Message window:
-- Lingo syntax
put(1 < 2 and 2 < 3)
// JavaScript syntax
put((1 < 2) && (2 < 3));
The result is 1, which is the numerical equivalent of
TRUE
.
The first logical expression in the following statement is
TRUE
; and the second logical expression is
FALSE
. Because both logical expressions are not
TRUE
, the logical operator displays the result 0,
which is the numerical equivalent of
FALSE
.
-- Lingo syntax
put(1 < 2 and 2 < 1)
-- 0
// JavaScript syntax
put((1 < 2) && (2 < 1));
// 0
See also
not
,
or
contains
Usage
-- Lingo syntax
stringExpression1
contains
stringExpression2
// JavaScript syntax
stringExpression1
.indexOf(
stringExpression2
);
Description
Operator; compares two strings and determines whether
stringExpression1
contains
stringExpression2
(
TRUE
) or not (
FALSE
).
The
contains
comparison operator has a precedence level of 1.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...