I was looking at some example C++ code for a hardware interface I\'m working with and noticed a lot of statements along the following lines:
if ( NULL == pMsg )
I forget the article, but the quote went something like: "Evidently its easier remembering to put the constant first, than it is remembering to use ==" ;))
When the constant is first, the compiler will warn you if you accidentally write =
rather than ==
since it's illegal to assign a value to a constant.