[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Table functions in Lua 5.2 Reference Manual
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 29 Apr 2011 15:00:23 -0300
> While you're in such a forthcoming mood: what will happen in
> the following cases?
> t={1,2,3}; table.insert(t,-1e8,nil); print(t[1])
> t={1,2,3}; k=-42; table.insert(t,k,1); table.remove(t,k); print(t[1])
roberto@arraial:~/prj/lua$ lua
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
> t={1,2,3}; table.insert(t,-1e8,nil); print(t[1])
nil
> t={1,2,3}; k=-42; table.insert(t,k,1); table.remove(t,k); print(t[1])
nil
-- Roberto