[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple multiret calls ignores some outputs (Bug report)
- From: pocomane <pocomane_7a@...>
- Date: Thu, 18 Jan 2018 14:10:02 +0100
Yes,
```
Both function calls and vararg expressions can result in multiple values. If a function call is used as a statement (see §3.3.6), then its return list is adjusted to zero elements, thus discarding all returned values. If an _expression_ is used as the last (or the only) element of a list of expressions, then no adjustment is made (unless the _expression_ is enclosed in parentheses). In all other contexts, Lua adjusts the result list to one element, either discarding all values except the first one or adding a single nil if there are no values. ```