I know that there are other similar topics, but I could not find a direct answer to my question.
Suppose you have a function, for example:
function aFunction()
local aLuaTable = {}
if (something) then
aLuaTable = {}
end
end
For the aLuaTable variable inside the if statement, it is still local. Basically what I ask is that I first define the variable as local, and then I use it again and again, any number of times it will remain local for the rest of the program’s life cycle, how does it work exactly?
In addition, I read this definition for Lua global variables:
Any variable not contained in a particular block is called global. Everything that is available globally is available to all inland areas.
?, , "" , , ?.
, , Java objective-c, lua .