lua-users home
lua-l archive

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


Hallo,

On Sun, Aug 24, 2014 at 5:05 AM, Paul Merrell <marbux@gmail.com> wrote:
>
> A function begins at line 43 and a series of if blocks at line 48.
> The variables within each if block are globals. How might I refactor
> my function so that the same variables are locals, if possible.
>

You could declare both variables as locals inside the function but
before the first if block.

Cheers,
-alex