lua-users home
lua-l archive

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


Hi,

is there any real difference between

local a = foo()
-- use a
local a = bar()
-- use a

and

local a = foo()
-- use a
a = bar()
-- use a

luac -l shows me that the first uses another local variable, but
generates shorter code.  Assuming I don't go crazy with that (and thus
reach the 200 or so local variable limit): is there any reason not to
use local twice?

</nk>