lua-users home
lua-l archive

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


Actually, Lua can kind of do this already, through Associative Array and Functions.

const["native"] = 1
const["rock"] = 2

a = { a = 1,
      b = { b = 2,
            c = function() { return const[style] }
          }
     }

style = "native"
x = a.b.c()

William C. Bubel