I have done this before.
That's when I want to add some debuggers later.
Yes of course he could do
if (foo != "bar"){ //something }else{}
But isn't that the same thing?
Return to the code you saw.
So the programmer may have done this:
if (foo == "bar"){} else{}
Then later, when he wanted to add some debugging information to the 1st part, he would.
Logic still works, and it is not mistaken to a lesser extent. (in my opinion)
Neal
source share