# Syntax Coloring for “Possible Unwanted Assignment” Issue

Apparently Mathematica's syntax coloring engine believes that the second assignment in the following code excerpt (concocted for illustration purposes only) is a "Possible Unwanted Assignment" since unchecking this box in Preferences causes the red highlighting to disappear:

Any ideas why Mathematica should believe that this assignment is possibly unwanted? The variable b is used after all in the test conditional for the While loop whereas f and g are not.

-

This is because you are using = (the assignment operator) in the condition (not the body) of While. It is a typical beginner mistake to use = where == is meant, so Mathematica warns about this.
Since you also use several ; in the condition, it gets a little confused and only highlights one of the = signs, not all of them.