[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: _G function inside table
- From: Patrick Donnelly <batrick@...>
- Date: Fri, 24 Jun 2011 16:26:07 -0400
On Fri, Jun 24, 2011 at 3:57 PM, Kev Lugli <kevlugli@gmail.com> wrote:
> Hi, I'm trying to do something like this, but I've got no success yet.
>
> a = 'func'
> var={}
>
> function _G['var.'..a](a)
> print 'a'
> end
>
> var.func()
a = 'func'
var = {}
_G.var[a] = function (a)
print(a)
end
var.func("a")
--
- Patrick Donnelly