[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Surprising behavior of table.insert()
- From: Vaughan McAlley <vaughan@...>
- Date: Sat, 26 Feb 2011 11:22:38 +1100
On 26 February 2011 10:55, HyperHacker <hyperhacker@gmail.com> wrote:
> It's interesting to note that lua_isnumber returns true for strings
> that can be converted to numbers, so perhaps lua_isnil should return
> true for "no value", thus fulfilling the expectation that missing
> arguments and nil arguments are the same? You'd still be able to do
> (lua_isnil(L, n) && !lua_isnone(L, n)) if you wanted to differentiate
> the two for some reason.
That's what lua_isnoneornil(L, n) is for :-)