lua-users home
lua-l archive

Re: removing key from table

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


Removed from virtual space and resource I meant of course. :-)
If I had something like:
t = {"string", "longdatastring", 10023841}
Than "table.remove(t,2)" would really remove it so in virtual space/resources/memory I would really have:
t = {"string", 10023841}
Right? Or doesn't it even really do that?
On 5/21/2012 6:16 PM, Luiz Henrique de Figueiredo wrote:
Does that actually "remove" it or just set it to nil, because I know how
to do that. But I wanna remove it.
Define "remove" then. Consider:
	t={ a=10 }
	print(t.a.t.b)
	t.a=nil
	print(t.a.t.b)
Is field 'a' now any different from field 'b'?

AltStyle によって変換されたページ (->オリジナル) /