lua-users home
lua-l archive

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


i want create a interpreter based on Lua , but when bodies from other langs come to my interpreter lang say sometimes this default option that 0 and null string have true value bother them because in many langs 0 and null string have false value.

for example i want in my interpreter this code works :
test = "Hello"
if test then
  -- Do Something
end

--- On Mon, 8/16/10, Jonathan Castello <twisolar@gmail.com> wrote:

From: Jonathan Castello <twisolar@gmail.com>
Subject: Re: _expression_ statements
To: "Lua list" <lua@bazar2.conectiva.com.br>
Date: Monday, August 16, 2010, 12:58 PM

Why do you want to do this, anyways? It's a very small issue in the
grand scheme of things. What specific reason do you have for changing
the default behavior?

~Jonathan

On Mon, Aug 16, 2010 at 10:45 AM, Peyman <peiman_3009@yahoo.com> 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 ?