In a module or package. What's the different with the function and the local function?
Just the local function cant be seen from outside the module?
I tried to setup a module with a local function
but When i use the module, i got that
attempt to call global 'foo2' (a nil value)
What's the problem? Thank you!
Just the local function cant be seen from outside the module?
I tried to setup a module with a local function
wang_test={}
function wang_test.foo1(str)
local _f=foo2 ()
_f()
end --function wang_test.foo1()
---------------------------------
local function foo2 ()
return function ()
print('This is my test')
end --
end --local function f_2 but When i use the module, i got that
attempt to call global 'foo2' (a nil value)
What's the problem? Thank you!