Strict Inequality Operator - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

!== strict inequality operator

expression1 !== expression2
Tests for the exact opposite of the strict equality (
performs the same as the inequality operator except that data types are not converted.
If
is equal to
expression1
As with the strict equality (
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.
Availability: ActionScript 1.0; Flash Lite 2.0
Operands
expression1 :
Object
function.
expression2 :
Object
function.
Returns
- The Boolean result of the comparison.
Boolean
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); // true
trace(s1 == b); // false
trace(s1 === s2); // true
trace(s1 === s3); // false
trace(s1 === n); // false
trace(s1 === b); // false
trace(s1 !== s2); // false
trace(s1 !== s3); // true
trace(s1 !== n); // true
trace(s1 !== b); // true
, and their data types are equal, the result is
expression2
) operator, the definition of equal depends on the data types
===
- A number, string, Boolean value, variable, object, array, or
- A number, string, Boolean value, variable, object, array, or
), and strict inequality (
===
)operator. The strict inequality operator
===
) operators:
!==
.
false
Operators
173

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Table of Contents