lua-users home
lua-l archive

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


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 :-)