[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Confusive text in Lua doc "Variable Number of Arguments" about "arg"
- From: Andrew Gierth <andrew@...>
- Date: Thu, 09 Sep 2021 12:11:40 +0100
>>>>> "Philippe" == Philippe Verdy <firstname.lastname@example.org> writes:
Philippe> This is quoted from Lua 5.2
No it's not, it's from _section 5.2_ of the book about Lua 5.0.
Philippe> And this is the only text available on official site lua.org
It is the only text _of the book_ there, because the updated editions of
the book cost actual money to buy.
The reference documentation for 5.2 which can be found at
https://www.lua.org/manual/5.2/ covers this issue under "function
Philippe> Version 5.2 really had the implicitly declared local variable
5.0 had that, 5.1 deprecated it in favour of ..., and 5.2 removed it.
This is trivially verified by experiment:
$ lua51 -e 'arg="foo" (function(...) print(arg) end)(1)'
$ lua52 -e 'arg="foo" (function(...) print(arg) end)(1)'