lua-users home
lua-l archive

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


On 17/03/2010 16:39, Mariusz Stanisz wrote:
What do you guys mean by "handle tables as keys" and "shared tables" .

local t = { 1, 2, 3 } -- shared table
local ct =
{
  a = t,
  b =
  {
    c = "a",
    d = t
  },
  [t] = "Table as key"
}

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --