Andreas. Posted August 1, 2012 Posted August 1, 2012 Hoi, but ~= is the same as "not" right? If it is, why can't I use it? "unexpected symbol near ~"
_Dark_ Posted August 1, 2012 Posted August 1, 2012 (edited) local a = 5 local b = 10 if(a ~= b) then -- NOT EQUAL -- code end showCursor(not isCursorShowing()) -- INVERSION Maybe you post your code? Edited August 1, 2012 by Guest #define if while#define TRUE FALSE// problems?
Anderl Posted August 1, 2012 Posted August 1, 2012 Hoi, but ~= is the same as "not" right? If it is, why can't I use it? "unexpected symbol near ~" It's not the same. "not" means "condition == false/nil" "~=" means "condition is not something". "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
_Dark_ Posted August 1, 2012 Posted August 1, 2012 "not" means "condition == false/nil" NOT not only equal operator. #define if while#define TRUE FALSE// problems?
Anderl Posted August 1, 2012 Posted August 1, 2012 "not" means "condition == false/nil" NOT not only equal operator. What? Explain that better because I think I didn't understand. "not" is an operator that means "condition is false/nil". It has nothing to do with equal operator "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
_Dark_ Posted August 1, 2012 Posted August 1, 2012 What? Explain that better because I think I didn't understand. "not" is an operator that means "condition is false/nil". It has nothing to do with equal operator Ok. "not" isn't only means "condition == false/nil". #define if while#define TRUE FALSE// problems?
Anderl Posted August 1, 2012 Posted August 1, 2012 Oh so what does it mean? That the condition is true? "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Kenix Posted August 1, 2012 Posted August 1, 2012 print( not false ) -- true http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
_Dark_ Posted August 1, 2012 Posted August 1, 2012 Oh so what does it mean? That the condition is true? Stop. In this topic you shown your Lua experience. Operator NOT also invert value. You must know this. #define if while#define TRUE FALSE// problems?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now