3 Feb
2010
3 Feb
'10
6:16 a.m.
Reinhard Kotucha wrote:
This seems to be wrong. select (1, ....) should only return the first argument, not both. I'm wondering why select (2, ....) works as expected. I must admit that I couldn't find any specs for select(), it just appears in some examples in the Lua book.
The reference manaul is separate. You can buy it on paper, but much easier is the free online version, because it conveniently starts with an index right after the toc: http://www.lua.org/manual/5.1/ From there: select (index, ยทยทยท) If index is a number, returns all arguments after argument number index. Otherwise, index must be the string "#", and select returns the total number of extra arguments it received. Best wishes, Taco