lua-users home
lua-l archive

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

This caught my attention in the reference manual in the Expressions section:

a,b,c = f(), x     -- f() is adjusted to 1 result (c gets nil)

It seems that a function call used in an explist other than the last element is adjusted to return at most one value.  There is another similar example a few lines down.

Am I understanding that right?

The text is consistent.  The text says that if the function call is the last, then all of the values returned are used.  But doesn’t actually say what happens if it isn’t the last element (unless I missed it).

Thank you,

Attachment: signature.asc
Description: Message signed with OpenPGP