Relational operators
The relational operators in nzLua are ==, ~=,
<, >, <=, >=,
!=, <>
These relational operators always result in false or true.
Equality (==) first compares the type of its operands. If the types are
different, then the result is false. Otherwise, the values of the operands are compared.
Numbers and strings are compared inthe usual way. Objects (tables, userdata, and functions) are
compared by reference: two objects are considered equal only if they are the same
object. Every time you create a new object (a table, userdata, thread, or function), this new object
is different from any previously existing object.
The conversion rules of Coercion donot apply to equality comparisons. Thus,
"0"==0 evaluates to false,
andt[0]andt["0"]denote different entries in a table.
The operators ~=, <>, and != are exactly the negation of equality (==).
- If both arguments are numbers, they are compared as such.
- If both arguments are strings, their values are compared according to the current locale.