lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


In Chapter 3 concerning relational operators expressions, PIL says that "if values have different types, Lua considers them not equal"

So if I understood this, this means that if a boolean and a string are related, using ~= , means that they are like apples and oranges?

Because right after that statement, "Otherwise, Lua compares them according to their types."

So if a value is Boolean meaning either true or false, and the other comparator is a String, of the value "true", so they are evaluated equal by Lua even if ~= is used?

hope I understood it correctly.