lua-users home
lua-l archive

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


Hi all,

After reading pil, I know adding an extra parentheses can let function return only one return value:  

function f()
        return 1, 2
end

print(f())   --> 1, 2
print((f()))  --> 1

But the pil doesn't tell the reason behind it.

Could anyone explain it? Thanks very much in advance!

Best Regards
Nan Xiao