[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Fwd: How to forward declare globals
- From: Rob Kendrick <rjek@...>
- Date: Mon, 6 Oct 2014 13:17:39 +0100
On Mon, Oct 06, 2014 at 02:15:36PM +0200, Charles Smith wrote:
> Okay, I got it to work:
>
> v = "m1"
>
> function m1 ()
> print ("hello world")
> end
>
> _G[v]()
I'm trying, and failing, to see a situation where this is the most
elegant solution.
Can't you just define the function first? Calling functions by name
rather than value is fraught with horror.
B.