[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: NIL in arith. and string op.
- From: "Nodir Temirhodzhaev" <tnodir@...>
- Date: Thu, 25 Dec 2003 12:47:54 +0300
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".