lua-users home
lua-l archive

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


On Thu, Nov 29, 2001 at 01:08:28AM -0800, Steve Dekorte wrote:
> One of the greatest things about lua to me is the ease of defining data 
> structures.
> But there are a few things I wish I could do.
> 
> t = { 1 = "b" }

   t = { [1] = "b" }

> t = { "a" = "b" }

   t = { ["a"] = "b" }

> t = { [[a]] = "b" }

   t = { [a] = "b" }

> these all fail even though these work:
> 
> t[1] = "b"
> t["a"] = "b"
> t[[[a]]] = "b"
> 
> Would it be difficult to get {} table definitions to support these 
> indices types?
> 
> Steve
> 

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net