lua-users home
lua-l archive

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



On Jun 27, 2008, at 8:56 PM, Tracy Hill wrote:

Is there a way to use the metatable __add concept on numbers( and booleans)?

You can try debug.setmetatable (object, table):

http://www.lua.org/manual/5.1/manual.html#pdf-debug.setmetatable

Beware of unintended consequences as this might be too clever by half :)

--
PA.
http://alt.textdrive.com/nanoki/