lua-users home
lua-l archive

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


> I think that's the issue: consider the two lines
>
> f = avalue
> function g(x)
> ...
> end
>
> If 'function' could appear directly as a function argument, then these
> statements would not work as expected.
>
> steve d.
>

That wouldn't be a problem since "function g(x)" is a statement to
assign a function that is currently defined to the global value "g",
whereas "function (x)...end" is no valid statement at all, unless it
is being a part of an argument or a value to be assigned to a
variable.