| Author |
Coding standard - condition order in if statement.
|
Janne A Andersson
Greenhorn
Joined: Mar 18, 2003
Posts: 2
|
|
Hi, is there any reason why would be considered better then I can't really see it being cosmetical reasons, but I could be wrong... thanks Jan
|
 |
Janne A Andersson
Greenhorn
Joined: Mar 18, 2003
Posts: 2
|
|
Got an answer, it comes into play when you do an equal-test (==), to prevent accidental assignment. With a not equal test it doesn't add anything, more to keep up the habit and for consistency reasons i guess...
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
Yup. See also this thread.
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: Coding standard - condition order in if statement.
|
|
|