[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to evade using globals in an if block
- From: Alex Queiroz <asandroq@...>
- Date: Sun, 24 Aug 2014 22:18:37 +0200
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