lua-users home
lua-l archive

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


yea it works but my mean is :
test = "Test"
if test then
    print("", "True")
else
    print("", "False")
end

now this code works in lua but if i set test = "" still it works because strings in lua have true value so "False" print never shown.

--- On Mon, 8/16/10, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:

From: Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
Subject: Re: _expression_ statements
To: "Lua list" <lua@bazar2.conectiva.com.br>
Date: Monday, August 16, 2010, 1:32 PM

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

It already works in the stock interpreter, doesn't it?