lua-users home
lua-l archive

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


Calling foo() from the following module results in an
"attempt to call global 'bar' (a nil value)":

module(...)

function foo()
   bar()
end

local function bar()
end


But it's running through if I
 a) define bar() before foo() or
 b) define bar() to be non-local.

What's going on here? I don't understand it.


Ciao
Andreas