[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Variable in variable's name?
- From: Duncan Cross <duncan.cross@...>
- Date: Thu, 16 Jun 2011 19:27:23 +0100
On Thu, Jun 16, 2011 at 7:21 PM, Kev Lugli <email@example.com> wrote:
> Hi, maybe it's a silly question, but I'd like to know how to declare
> for example a function using a variable in its name. For example:
> base = 'f'
> base..'inal' = 'result'
> Where "base" is a variable and "inal" a simple string.
> The resulting variable name sould be "final".
> Thanks in advance.
base = 'f'
_G[base..'inal'] = 'result'