Just FUN :D
jafarabadi.qt last edited by
Hi dears, please look this...
if ( false==false==false )
qDebug()<<"Ding Ding !"; //UNREACHABLE CODE
i think that it should be ok and print my message because of
FALSE is FALSE and FALSE will be FALSE!!!
compiler work with it's result which it returned. but why?
i know we need the result for if but... let's speak about it...
Jeroentjehome last edited by
Off course this compiles (will give Wparentheses warning). The result will be not printing the output! Very simpel, the == operator does a compare of the first two elements (false==false) this will return true. Then do the compare of true==false -> result false, so your code does:
So this does not work and will not print the output
Kasal last edited by
That's great! So if FFF is false, test FTF, you'll be surprised!
How does a brain works to find such things!