lua-users home
lua-l archive

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


On Aug 24, 2014 2:51 PM, "Paul Merrell" <marbux@gmail.com> wrote:
>But where I'm still at sea is in evading
> the use of globals in an if block or loop inside a function. I feel
> like I'm missing something basic. An example at
> <https://gist.github.com/Marbux/961d5aa3244993e42cae>, which executes

You can declare the variables right befor the if blocks:

function ...
  local strMessage, bTerminate
  if ...
  end
  return strMessage, bTerninate
end