[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Initializing Modules
- From: Stefan Brantschen <sbr@...>
- Date: Sat, 5 Aug 2006 11:49:08 +0200
How, or when, are local variables in a module actually defined and
initialized?
Say we have
module(mod)
local some_bool = false
local some_table = {}
function some_function ()
-- do stuff
end
-- end module mod
which we use with
require "mod"
some_function()
...
=> Is this done by 'loader' in 'require' in listing 15.1 in PIL II
(page 139), ie. are all (local) vars in the module 'mod' defined and
initialized after 'require "mod"'?
Thanks for clarification.
With regards
- Stefan