lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



... except for the last value: if require 'q' returns multiple values,
they'll all be put into the table.

Incidentally, is there a practical reason for this exception?  I mean why not insert all returned values irrespective of the position within the initialization list?  Lua has a dedicated syntax for adjusting the returned values of a function to one anyway so if this behavior is desired it can be enforced manually.  This can only lead to confusion as far as I can see but I always assumed that there's a reason I don't see.  I suspect the reason is that it wouldn't know the index of values past the first function call any more so another opcode for "append to the end of the array part of table" would be required.

Excuse the interruption.