Metatable Events

lua-users home
wiki

Difference (from prior major revision) (minor diff, author diff)

Added: 31a32,33
* __close - (Lua 5.4+) Makes metatable to-be-closed variable, if not set to nil or false.


Changed: 52c54
* __bxor - (Lua 5.3) the bitwise exclusive OR (binary ~) operation.
* __bxor - (Lua 5.3) the bitwise exclusive OR (binary ^) operation.

A listing of all the 'special' keys in a metatable, and the metamethods which they perform.

Mathematic Operators

Bitwise Operators

Lua 5.3 introduced the ability to use true integers, and with it bitwise operations. These operations are invoked similar to the addition operation, except that Lua will try a metamethod if any operand is neither an integer nor a value coercible to an integer.

Equivalence Comparison Operators


RecentChanges · preferences
edit · history
Last edited January 9, 2021 9:29 am GMT (diff)