03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The strict equality operator considers variables that are references<br />

// distinct from literals <strong>and</strong> variables<br />

trace(stringRef === "asdf"); // false<br />

trace(stringRef === str); // false<br />

See also<br />

! logical NOT operator, != inequality operator, !== strict inequality<br />

operator, && logical AND operator, || logical OR operator, == equality<br />

operator<br />

!== strict inequality operator<br />

expression1 !== expression2<br />

Tests for the exact opposite of the strict equality (=== )operator. The strict inequality operator<br />

performs the same as the inequality operator except that data types are not converted.<br />

If expression1 is equal to expression2, <strong>and</strong> their data types are equal, the result is false.<br />

As with the strict equality (===) operator, the definition of equal depends on the data types<br />

being compared, as illustrated in the following list:<br />

■ Numbers, strings, <strong>and</strong> Boolean values are compared by value.<br />

■ Objects, arrays, <strong>and</strong> functions are compared by reference.<br />

■ A variable is compared by value or by reference, depending on its type.<br />

Oper<strong>and</strong>s<br />

expression1 : Object - A number, string, Boolean value, variable, object, array, or<br />

function.<br />

expression2 : Object - A number, string, Boolean value, variable, object, array, or<br />

function.<br />

Returns<br />

Boolean - The Boolean result of the comparison.<br />

Example<br />

The comments in the following code show the returned value of operations that use the<br />

equality (==), strict equality (===), <strong>and</strong> strict inequality (!==) operators:<br />

var s1:String = "5";<br />

var s2:String = "5";<br />

var s3:String = "Hello";<br />

var n:Number = 5;<br />

var b:Boolean = true;<br />

160 ActionScript language elements

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!