User Guide

148 ActionScript language elements
Example
In the following example, the greater than (>) operator is used to determine whether the value
of the text field
score_txt is greater than 90:
if (score_txt.text>90) {
trace("Congratulations, you win!");
} else {
trace("sorry, try again");
}
gt greater than (strings) operator
expression1 gt expression2
Deprecated since Flash Player 5. This operator was deprecated in favor of the > (greater
than) operator.
Compares the string representation of
expression1 with the string representation of
expression2 and returns true if expression1 is greater than expression2, false
otherwise.
Availability: ActionScript 1.0; Flash Lite 1.0
Operands
expression1 : Object - Numbers, strings, or variables.
expression2 : Object - Numbers, strings, or variables.
Returns
Boolean - The Boolean result of the comparison.
See also
> greater than operator
>= greater than or equal to operator
expression1 >= expression2
Compares two expressions and determines whether expression1 is greater than or equal to
expression2 (true) or expression1 is less than expression2 (false).