Possible Duplicate:
What is the difference between these (bCondition == NULL) and (NULL==bCondition)?
Why do some people write instead of:
if(someVar == 0) {}
this:
if(0 == someVar) {}
What is the difference ?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just a good practice. If by mistake, you use single
=instead of==, finding the bug in the first one is very difficult but the second one would fail to compile clearly showing the line of error.