Operators
27
Assignment operators
Assignment operators assign a value to its left operand based on the value of its right operand.
With the exception of the basic assignment operator, equal (
=
), all of the following shortcut
assignment operators apply only to JavaScript syntax.
Logical operators
Logical operators test whether two logical expressions are true or false.
Use care when using logical operators and string operators in Lingo and JavaScript syntax. For
example, in JavaScript syntax
&&
is a logical operator that determines whether two expressions are
true, but in Lingo,
&&
is a string operator that concatenates two strings and inserts a space
between the two expressions.
!==
(JavaScript syntax only) Two operands are not equal and/or not of the
same type
1
<>
(Lingo only) Two operands are not equal
1
<
The left operand is less than the right operand
1
<=
The left operand is less than or equal to the right operand
1
>
The left operand is greater than the right operand
1
>=
The left operand is great than or equal to the right operand
1
=
(Lingo only) Two operands are equal
1
Operator
Meaning
Precedence
=
Equal
1
x += y
(JavaScript syntax only) x = x + y
1
x -= y
(JavaScript syntax only) x = x - y
1
x *= y
(JavaScript syntax only) x = x * y
1
x /= y
(JavaScript syntax only) x = x / y
1
x %= y
(JavaScript syntax only) x = x % y
1
Operator
Effect
Precedence
and
(Lingo only) Determines whether both expressions are true
4
&&
(JavaScript syntax only) Determines whether both expressions are true 4
or
(Lingo only) Determines whether either or both expressions are true
4
||
(JavaScript syntax only) Determines whether either or both expressions
are true
4
not
(Lingo only) Negates an expression
5
!
(JavaScript syntax only) Negates an expression
5
Operator
Meaning
Precedence
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...