[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Lua5.2] __len meta-method has two operand?
- From: Xavier Wang <weasley.wx@...>
- Date: Thu, 13 Oct 2011 21:04:51 +0800
2011/10/13 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>> I have modified my code to support this undocumented 'feature'.
>
> It is not undocumented (although it is not listed in the incompatibility
> section):
>
> http://www.lua.org/work/doc/manual.html#2.4
>
> For the unary - and # operators, the metamethod is called with a
> dummy second argument. This extra argument is only to simplify Lua's
> internals; it may be removed in future versions and therefore it is
> not present in the following code. (For most uses this extra argument
> is irrelevant.)
>
> -- Roberto
>
>
Sorry, my bad :-(
anyway, very thank you for your help and document :-)