lua-users home
lua-l archive

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


> so, i guess it's very hard, an likely impossible, but it is
> conceivable that a valid sequence table has all its values in the hash
> part.

Indeed, it is very easy:

a = {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1, a7 = 1, a8 = 1, a9 = 1}
a[1] = 10
a[2] = 20
a[3] = 30

for k,v in pairs(a) do print(k,v) end
--> 1	10
--> a9	1
--> a8	1
--> 3	30
--> a4	1
--> a5	1
--> a6	1
--> a7	1
--> a3	1
--> a2	1
--> a1	1
--> 2	20

-- Roberto