lua-users home
lua-l archive

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


I know that tables don't preserve order in case of an associative array.

but I 've got the following code (didn't scoped them for the ex):

iterator = 0
basic_table ={}

for x = 0,5 do
iterator = iterator + 1

         basic_table["k"][iterator] = iterator + 100


str = table.concat(basic_table,",")

indexing is continuous and always numeric.

If i concat this table in str, am I sure the order is preserved ?
My tests confirm that but I just can't bear a mistake|my misconception there that would occur -even once a decade :)