lua-users home
lua-l archive

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


Is it possible - if nil used in arithmetic or
string (concat.) operations set it's value
to 0 or empty string, not raising error?

Eg., 10 + nil == 10; "ab"..nil.."c" == "abc"

I think, for numbers in function luaV_tonumber may be add:
... else if (ttisnil (L, ... return 0 nvalue.
But for nil also checked "tostring".