lua-users home
lua-l archive

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


2013/5/7 Geoff Leyland <geoff_leyland@fastmail.fm>:

>> function a() print(debug.getinfo(2, "n").name) end

I can't believe I missed that, so I looked carefully at what I did.
Relative to your example, the minimal difference is this:

    function a() print(debug.getinfo(2, "n").name) end
    function b() return a() end
    b()
nil

It is instructive to work out the reason why in this case there
is no name.

Thanks!