[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: global/local a misnomer?
- From: PA <petite.abeille@...>
- Date: Fri, 17 Feb 2006 05:04:03 +0100
On Feb 16, 2006, at 19:39, David Manura wrote:
(1) A major impression I had was of the inability to store nil values
in a table. This has some implications such as not really being able
to store an argument list "..." in a table (and then use unpack) since
the argument list might contain nil values.
Yes. Very unfortunate mismatch :/
That said, you can pass around the argument list "as is", or even
manipulate it to a certain extend without the need to pack/unpack
things:
aValue = function( anObject, ... )
return anObject:forward( aKey, ... )
end
Also, enumerating arguments requires a bit of, er, "magic":
local aCount = select( "#", ... )
for anIndex = 1, aCount do
local aValue = select( anIndex, ... )
end
Oh, well...
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/