NogDog wrote:"&&" and "||" have a higher precedence than "=", which has a higher precedence than "and" and "or".
Oh dear, I forgot about the copy assignment operator.
halojoy wrote:I think it can have to do with Precedence of OR/AND vs. ||/&&
(...)
The AND/OR have same mutual relational precende as ||/&&
It does, but as NogDog explained, it really has to do with =. Indeed, when you presented your example I stated that the logical expressions are equivalent, and they certainly are, if you exclude the assignment.
By the way, next time please provide the smallest and simplest script that demonstrates the problem, and also state what exactly is the problem. Although it is often possible to reason out the problem by inspection even when its description is incomplete, being able to run the script to confirm or deny the observation helps.