Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Operators > lt (string less than) | |||
Flash Lite 1.0.
expression1ltexpression2
expression1, expression2 Numbers, strings, or variables.
Operator (comparison); compares the string representation of expression1 to the string representation of expression2 and returns a true value if expression1 is less than expression2; otherwise, it returns a false value. Strings are compared using alphabetical order; digits precede all letters, and all capital letters precede lowercase letters.
The following examples show the output of various string comparisons. In the last line, notice that lt does not return an error when you compare a string to an integer because ActionScript 1.0 syntax tries to convert the integer data type to a string and returns false.
animals = "cats";
breeds = 7;
trace ("persons" lt "people"); // output: 0(false)
trace ("cats" lt "cattle"); // output: 1(true)
trace (animals lt "cats"); // output: 0(false)
trace (animals lt "Cats"); // output: 0(false)
trace (breeds lt "5"); // output: 0(false)
trace (breeds lt 7); // output: 0(false)
|
|
|
|