[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple return value in __index metamethod
- From: PA <petite.abeille@...>
- Date: Tue, 10 Jul 2007 20:41:47 +0200
On Jul 10, 2007, at 20:37, Lavergne Thomas wrote:
value, delta = object[idx]
but it's impossible.
Well... if you don't mind a bit of overhead, what about:
local value, delta = unpack( object[ idx ] )
Assuming object[ idx ] returns a table with { value, delta }
Not sure if the cure is worse than the disease though...