lua-users home
lua-l archive

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


I don't have an exe of Lua5.0 to test this on so could someone else tell me
if it works.

Since functions are values, then instead of:
    function f(a) print("a="..a) end
    f(123)

or
    f = function (a) print("a="..a) end
    f (123)

one should be able to write:
    function (a) print("a="..a) end (123)

however this doesn't work in Lua4.0. Does it work in Lua5.0?

*cheers*
Peter Hill.

PS: Has anybody checked the Lua language for syntactic non-ambiguity etc?