Meaning#
nil represents an absent value. Assigning nil removes a table field. Returning nil and returning no values differ in result count.
Example#
local function empty() end
local function one_nil() return nil end
local a = select("#", empty()) -- 0
local b = select("#", one_nil()) -- 1What happens: a = 0, b = 1; no results and one nil have different result counts.
This fragment does not print or write a log message. The values shown are the expected results of the example.