[redirecting back to the list]
On 07/27/2019 09:38 PM, James Lu wrote:
On Jul 27, 2019, at 12:44 PM, Ethan Furman wrote:
Sure, folks /know/ what it means, but it's a common bug because it doesn't read as "if some_var is assigned 7" but as "if some_var is equal to 7".
That’s a straw man- a modern linter or compiler would catch that. Many editors have linters integrated inside. The way to disable it is to put parentheses around the assignment expesssion.