MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 182

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Operator
<=
>
>=
==
!=
&
^
|
&&
||
?:
=
*=, /=, %=, +=, -
=, &=, |=, ^=,
<<=, >>=, >>>=
,
About using operators with strings
Comparison operators compare strings only if both operands are strings. An exception to this
rule is the strict equality (
both operands to numbers and performs a numeric comparison on them. For more
information on numeric operators, see
Except for the equality operator (
differently than when they operate on other values.
Comparison operators compare strings to determine which is first alphabetically. Strings with
uppercase characters precede strings that are lowercase. That means that "Egg" comes before
"chicken".
var c:String = "chicken";
var e:String = "Egg";
trace(c < e); // false
var riddleArr:Array = new Array(c, e);
trace(riddleArr); // chicken,Egg
trace(riddleArr.sort()); // Egg,chicken
182
Syntax and Language Fundamentals
Description
Less than or equal to
Greater than
Greater than or equal to
Equal
Not equal
Bitwise AND
Bitwise XOR
Bitwise OR
Logical AND
Logical OR
Conditional
Assignment
Compound assignment
Comma
Lowest precedence
) operator. If only one operand is a string, ActionScript converts
===
"Using numeric operators" on page
), comparison operators (
==
Associativity
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Left to right
Right to left
Right to left
Right to left
Left to right
188.
,
,
, and
) affect strings
>
>=
<
<=

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents