lua-users home
lua-l archive

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


It doesn't seem possible to overload __lt, __le to return a result other
than a boolean. This is in contrast to other operators __add, __sub, etc...
I think this is an important one to be considered for a fix in the coming
version. Normally, the caller should have the means to define what the
output of a logical comparison, e.g. obj3 = obj1 < obj2.

Any suggestions for a workaround would be highly appreciated. I currently
use local functions that allows computation of obj3 = myLT(obj1,obj2).

Best
MKA

 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 6137 (20110520) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com