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

The following example illustrates the use of the inequality (
) operator in an
statement:
!=
if
var a:String = "David";
var b:String = "Fool";
if (a != b) {
trace("David is not a fool");
}
The following example illustrates comparison by reference with two functions:
var a:Function = function() { trace("foo"); };
var b:Function = function() { trace("foo"); };
a(); // foo
b(); // foo
trace(a != b); // true
a = b;
a(); // foo
b(); // foo
trace(a != b); // false
// trace statement output: foo foo true foo foo false
The following example illustrates comparison by reference with two arrays:
var a:Array = [ 1, 2, 3 ];
var b:Array = [ 1, 2, 3 ];
trace(a); // 1, 2, 3
trace(b); // 1, 2, 3
trace(a!=b); // true
a = b;
trace(a); // 1, 2, 3
trace(b); // 1, 2, 3
trace(a != b); // false
// trace statement output: 1,2,3 1,2,3 true 1,2,3 1,2,3 false
See also
,
,
! logical NOT operator
!== strict inequality operator
&& logical AND
,
,
,
operator
|| logical OR operator
== equality operator
=== strict equality
operator
<> inequality operator
expression1 <> expression2
Deprecated since Flash Player 5. This operator has been deprecated. Macromedia
recommends that you use the
operator.
!= (inequality)
Operators
153

Advertisement

Table of Contents
loading

Table of Contents