What does the ~=
operator mean in Lua?
For example, in the following code:
if x ~= params then
The operator ~= is exactly the negation of equality (==).
The ~ operator means logical negation, and the ~= operator means not equals.
An operator is a symbol that tells the interpreter to perform specific mathematical or logical manipulations. Lua language is rich in built-in operators and provides the following type of operators − Arithmetic Operators. Relational Operators.
The ~= symbol or operator in Lua is known as the not-equal to operator.
the ~=
is not equals
It is the equivalent in other languages of !=
The operator ~= is exactly the negation of equality (==).
See docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With