[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with Lua 5 table handling
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 31 Mar 2003 10:08:37 -0300
> It has actually become worse in Lua 5. Now, any function which does an
> implicit getn also does a setn (like table.foreachi).
This was "corrected" in the final version. There is no implicit calls
from getn to setn anymore. To traverse sparse arrays, however, you still
need to set its size:
f = { 1, nil, 10 }
table.setn(f, 3)
or
f = { 1, nil, 10 ; n=3 }
-- Roberto