lua-users home
lua-l archive

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


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