lua-users home
lua-l archive

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


I understand Lua programs much better than scoping lingo.  Lua upvalues
cannot be said to be lexically scoped because the following program prints
"5" instead of "10"?

    do
        local a = 5
        local foo = function() print(%a) end
        a = 10
        foo()
    end