You probably could create a custom build of Lua. I don't know
enough about the code to tell you where though.
Or, you could use this:
function toboolean(v)
if v=='' or v==0 then return false end
return v and true or false
end
...
if toboolean(somevalue) then
--will not run if somevalue is 0 or ''
end
On Mon, Aug 16, 2010 at 10:45 AM, Peyman wrote:
thanks this function works good but i dont want change 0 and
null string to true value, there is noway to fix it in Lua, so
0 and null string have false value by default ?