[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to write function x:y():f() ... end ?
- From: Petite Abeille <petite.abeille@...>
- Date: Thu, 28 Feb 2013 22:52:02 +0100
On Feb 28, 2013, at 2:57 AM, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> BTW, not every L-value can be used in function definition.
> The following code will give compilation error:
>
> local t = {}
> function t[1] ()
> end
Perhaps you mean:
local t = {}
t[1] = function() end
Which is a perfectly fine syntax.