[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Inline Functions
- From: Eero Pajarre <epajarre@...>
- Date: Sun, 22 Dec 2002 15:13:09 +0200
Peter Hill wrote:
I don't have an exe of Lua5.0 to test this on so could someone else tell me
if it works.
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?
It does not, but
( function (a) print ("a="..a) end ) (123)
Looking at the "Complete Syntax of Lua" this is just as
it should be. You need the extra parenthesis inorder to
convert from "exp" to "prefixexp".
(btw. it is pretty cool that "Complete Syntax of Lua" firs
on one page on the manual)