Ordering (<, <=, > , >=)
Airscript supports the following ordering operators: greater than (>), greater than or equal (>=), less than (<), less than or equal (<=). The ordering operators can be used with Numbers and Strings. For numbers these operators compare the magnitude of the number. Consider the following examples:
1 < 2 => TRUE
1 <= 2 => TRUE
1 < 1 => FALSE
1 <= 1 => TRUE
1 > 2 => FALSE
1 >= 2 => FALSE
1 > 1 => FALSE
1 >= 1 => TRUE
The ordering operators compare Strings lexicographically, consider the following examples:
"air" < "airscript" => TRUE
"air" <= "airscript" => TRUE
"airscript" < "airscript" => FALSE
"airscript" <= "airscript" => TRUE
"air" > "airscript" => FALSE
"air" >= "airscript" => FALSE
"airscript" > "airscript" => FALSE
"airscript" >= "airscript" => TRUE
Comparing the order between two complex objects will always return FALSE.
Last updated
Was this helpful?