
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The Comparison Operators
|
127
The strict equality operator, added in Flash MX, is created using three
equals signs in a row (
===). It should not be confused with either the
standard equality operator (
==) or the assignment operator (=). Simi-
larly, strict inequality, also added in Flash MX, is written as an excla-
mation point followed by two equals signs (
!= =), while the standard
inequality operator is written as an exclamation point followed by one
equals sign (
!=).
The Comparison Operators
The comparison operators (also called relational operators) are used to determine
which of two values appears first in a given order. Like the equality and inequality
operators, the comparison operators return one of the Boolean values,
true or false,
indicating whether the relationship described in the comparison is accurate (
true)or
inaccurate (
false).
Comparison operators are intended for comparing strings and numbers; when used
with other types, automatic datatype conversion occurs, as discussed later in this
chapter. When the two operands of a comparison operator are numbers, the com-
parison is performed mathematically: 5<10is
true, –3 < –6 is false, and so on.
When the two operands of a comparison operator are strings, the comparison is per-
formed according to character code points, as described ...