Nothing!. But, it's a good trick to prevent the common error of writing
if(x = 0)
The error above is the source of a lot of serious bugs and is very difficult to catch. If you cultivate the habit of writing the constant before the ==, the compiler will complain if you accidentally type
if(0 = x)
Of course, the trick only helps when comparing to a constant.
Thursday, April 2, 2009
Posted by Raghu Kumar on 6:59 PM