lua-users home
lua-l archive

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


On Mon, Dec 13, 2010 at 12:23 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> local append = table.insert
> local T = {}
> for _,o in ipairs(names) do
>   append(T,find_object(name))
> end
>
> find_object() may return nil, which is a standard Lua way of saying
> 'sorry chum no can do', and the fun begins.

is there any undesired effect to table.insert(t,nil) when t is a
well-formed array?  after all, it's inserting nil at the end,  leaving
the table unchanged and therefore still holeless  :-)


-- 
Javier