[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Metatables for numbers
- From: Petite Abeille <petite.abeille@...>
- Date: Fri, 27 Jun 2008 21:05:08 +0200
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/