[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Inline Functions
- From: "Peter Hill" <corwin@...>
- Date: Sun, 22 Dec 2002 19:22:14 -0000
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?