[Dev-luatex] select()

Taco Hoekwater taco at elvenkind.com
Wed Feb 3 07:16:13 CET 2010


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



More information about the dev-luatex mailing list