lua-users home
lua-l archive

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



Version:  Lua 5.1.3, installed in Fedora 8 via yum
Test code:
--
table1 = { "A", "B" }
table2 = { "C", "D" }
print(unpack(table1))
print(unpack(table1), unpack(table2))
--

Expected output:
A B
A B C D

Actual output:
A B
A C D

Notice the lack of a 'B' in the second line of actual output.
It doesn't seem to matter how many tables I decide to unpack, or how many elements are in the tables, all tables except the last one listed will only print their first element. ex: print(unpack(table1), unpack(table1), unpack(table1)) will output A A A B

-Daniel