The end variable is not the issue, it's the fact that the code is using the truth value of '(' for no good reason. Using (var=exp) in a conditional statement usually wants to find out if exp is nonzero as well as doing the assignment. Here _only_ the side effect of doing the assigment is desired, and the expression is meant to be always true. My suggested alternative clarifies that.