Boolean Not Equal To in Lua programming
13,160
Lua uses mostly keywords. Use not a
instead of ~a
.
Author by
Venkatesh
Updated on June 09, 2022Comments
-
Venkatesh over 1 year
How to write if statement in Lua with not equal symbol for boolean variable.
//In Java, boolean a; a = false; if(!a){ //do something } -- In Lua I am trying to replicate the same code local a a = false if(~a) then -- do something end
But I am getting error. How to write this in Lua ?
-
Keith Thompson over 9 years
-