lua-users home
lua-l archive

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

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, ... )

Also, enumerating arguments requires a bit of, er, "magic":

local aCount = select( "#", ... )

for anIndex = 1, aCount do
    local aValue = select( anIndex, ... )

Oh, well...


PA, Onnay Equitursay