[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Expression statements
- From: Jonathan Castello <twisolar@...>
- Date: Mon, 16 Aug 2010 11:29:17 -0700
When you can just as easily do test == "" and make it much clearer, I
don't see a problem. This is how Lua works. There will always be
people from one language pointing out things they don't like in
another.
~Jonathan
On Mon, Aug 16, 2010 at 11:17 AM, Peyman <peiman_3009@yahoo.com> wrote:
>
> 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 ?
>