lua-users home
lua-l archive

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


On Tue, Jul 1, 2008 at 12:57 PM, Andreas Weis
<der_ghulbus@ghulbus-inc.de> wrote:
> I expected the code to construct a table identical to the one from above. Am
> I missing something?

i guess the tables get constructed in a different sequence, and end up
with different allocated size.  the point is that there's no warranty
what would be the result of #t if there's discontinuity in the
indexes:

print (#{1,2,[4]=4})
=> 2
> print (#{[1]=1,[2]=2,[4]=4})
=> 4

i concur that you can't call that table an 'array' in that case

-- 
Javier