[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Syntactic Sugar for function??
- From: "nikdo79" <dominik-wagner@...>
- Date: Mon, 25 Mar 2002 18:41:09 -0000
Hi there,
Today i wanted to do this:
Table={}
local Function="MyFunction"
function Table[Function] ()
print("Hello World")
end
and i got an error!
I thought
function Var() ... end
was full "syntatic sugar" for
Var = function () ... end
but it sad-to-know isn't because
Table[Function] = function ()
print("Hello World")
end
works fine.
What's the Problem? A Bug? Or even intenion?
Regards,
Dominik