[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The 4 negations of Lua
- From: Sean Conner <sean@...>
- Date: Sun, 18 Sep 2016 03:04:52 -0400
It was thus said that the Great Russell Haley once stated:
> On Fri, Sep 16, 2016 at 11:23 PM, Sean Conner <sean@conman.org> wrote:
> >
> > not a == b
> >
> > is true if a is not equal to b.
>
> Hi Sean. My result differed (Lua prompt changed for inline formatting) :
>
> Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> % not 5 == 5
> false
> % not 5 == 6
> false
>
> % not "Mary"=="Mary"
> false
> % not "Mary"=="mary"
> false
>
> This was run on FreeBSD 10.3
I got hosed by precedence (darn! Should have tested these). They are
being parsed as:
(not 5) == 5
Try:
not (5 == 5)
not (5 == 6)
-spc