< less than operator
expression1 < expression2
Compares two expressions and determines whether
so, the operator returns
operator returns
false
letters come before lowercase letters.
Availability: ActionScript 1.0; Flash Player 4 - In Flash 4,
and later, the
(less than) operator is a comparison operator capable of handling various data
<
types. Flash 4 files that are brought into the Flash 5 or later authoring environment undergo a
conversion process to maintain data type integrity. The following illustrates the conversion of
a Flash 4 file containing a numeric quality comparison.
Flash 4 file:
x < y
Converted Flash 5 or later file:
Operands
expression1 : Number
expression2 : Number
Returns
- The Boolean result of the comparison.
Boolean
Example
The following examples show
comparisons:
trace(3 < 10); // true
trace(10 < 3); // false
trace("Allen" < "Jack"); // true
trace("Jack" < "Allen"); //false
trace("11" < "3"); // true
trace("11" < 3); // false (numeric comparison)
trace("C" < "abc"); // true
trace("A" < "a"); // true
. If
true
expression1
. String expressions are evaluated using alphabetical order; all capital
Number(x) < Number(y)
- A number or string.
- A number or string.
and
true
false
is less than
expression1
is greater than or equal to
is a numeric operator. In Flash 5
<
returns for both numeric and string
; if
expression2
, the
expression2
Operators
169
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?