lua-users home
lua-l archive

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




On Mon, Aug 16, 2010 at 10:36 AM, Peyman <peiman_3009@yahoo.com> wrote:
Hi All,
From Lua manual :
"in particular, the number 0 and the empty string are also true"
so my question is there anyway to create lua that 0 an empty string become true ? is there any work or patch for lua source ? in Lua 5.2 this is possible ?


function empty(x)
    return not x or x == 0 or x == ''
end



--
Javier