MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 87

Actionscript language reference
Table of Contents

Advertisement

Description
Operator; tests for the exact opposite of the strict equality (
operator performs the same as the inequality operator except that data types are not converted.
For more information, see
, and their data types are equal, the result is
expression2
operator, the definition of equal depends on the data types being compared, as illustrated in the
following list:
Numbers, strings, and Boolean values are compared by value.
Objects, arrays, and functions are compared by reference.
A variable is compared by value or by reference, depending on its type.
For more information, see
Example
The comments in the following code show the returned value of operations that use the equality
(
), strict equality (
==
var s1:String = "5";
var s2:String = "5";
var s3:String = "Hello";
var n:Number = 5;
var b:Boolean = true;
trace(s1 == s2); // true
trace(s1 == s3); // false
trace(s1 == n);
trace(s1 == b);
trace(s1 === s2); // true
trace(s1 === s3); // false
trace(s1 === n);
trace(s1 === b);
trace(s1 !== s2); // false
trace(s1 !== s3); // true
trace(s1 !== n);
trace(s1 !== b);
See also
! (logical NOT)
=== (strict equality)
% (modulo)
Availability
Flash Player 4.
Usage
expression1 % expression2
"Automatic data typing" on page
"Operator precedence and associativity" on page
), and strict inequality (
===
// true
// false
// false
// false
// true
// true
,
,
!= (inequality)
&& (logical AND)
) operator. The strict inequality
===
24. If
expression1
. As with the strict equality (
false
) operators:
!==
,
|| (logical OR)
is equal to
)
===
32.
,
,
== (equality)
% (modulo)
87

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents