lua-users home
lua-l archive

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


On Fri, Feb 21, 2020 at 12:53 AM Dibyendu Majumdar wrote:
2. If the function call is in an assignment _expression_ and is the last
_expression_, then the number of return values to accept is equal to
corresponding var plus any excess vars.


Should f() be invoked here? What is the number of return values?
local x,y = 1,2,3,f()
 
3. In all other cases the function return values are truncated to 1 result.


No.
In Lua functions may be used as procedures (truncated to 0 results):
f()