lua-users home
lua-l archive

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


That's false, print returns nothing, which is different from returning nil.

Compare the following:

function return_nil() return nil end
function return_nothing() end

print(select("#", return_nil()))
print(select("#", return_nothing()))

It only seems like print returns nil, if you expand the return value list to atleast one, which you always do when using it like this:
local x = print()


On Sun, Jun 21, 2009 at 9:52 PM, <paul.hermeneutic@gmail.com> wrote:
Perhaps I misunderstand the situation.  This would seem to be resolved
by the fact that (as stated) the return value of print() is nil.