lua-users home
lua-l archive

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


I'm not saying this is the most efficient way, but here's something you can do:

> hold = {}
> somenewtable = {}
> hold[somenewtable] = true
> hold[tostring(somenewtable)] = somenewtable
> print(tostring(somenewtable))

> print(tostring(somenewtable))
table: 0x807b6a0

Notice tostring on a table produces a unique string identifier for
that table... You can use it as your "hash".

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant