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

--- On Mon, 8/16/10, Jonathan Castello <> wrote:

From: Jonathan Castello <>
Subject: Re: _expression_ statements
To: "Lua list" <>
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?


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 ?