Depending on your personal political views this may or may not be politically correct ... but from the programming point of view it should be dogma.
Whenever you use a constant in a boolean expression ALWAYS put the constant on the left:
if (MAX == nValue)
if (nValue == MAX)
because sure as it is always sunning in Seattle someday you'll have to find the bug introduced by (someone else of course)
if (nValue = MAX)