syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

Question:
In Lua what is the not operator?

In Lua the not is the word 'not'.

In some languages the not operator is: '!'

Here is a demo of me using 'not':
dan@hp ~/ks/b/lua $
dan@hp ~/ks/b/lua $
dan@hp ~/ks/b/lua $ lua
Lua 5.3.0  Copyright (C) 1994-2015 Lua.org, PUC-Rio
>
> a = 1
> b = 2
> if not (a == b) then print('a is not equal b') end
a is not equal b
>
> os.exit()
dan@hp ~/ks/b/lua $
dan@hp ~/ks/b/lua $


syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me