lua-users home
lua-l archive

Re: Array Logical Operators

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


On 10/21/2011 10:02 PM, Dirk Laurie wrote:
2011年10月21日 Antonio Scuri:
 So, wouldn’t be interesting to Lua to have metamethods for Logical operators too?
From the Lua 5.2 manual (but I think it is older than that):
"eq": the == operation. The function _getequalhandler_ defines how Lua
chooses a metamethod for equality. A metamethod is selected only when
both values being compared have the same type and the same metamethod
for the selected operation.
Also "le" and "lt".
It is a rare pleasure to be able to assist someone with an e-mail
address like yours :-)
Nope. He wrote "logical operators".
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

AltStyle によって変換されたページ (->オリジナル) /