Posted May 14, 2018
![avatar](http://images.gog.com/b13211519e73aa06f8273a50b02964660502da1a057e7466ad747d57469678b9_avm.jpg)
int func(int x)
{
if (x = 0) {
puts("No, I will *not* divide by zero; you can't make me.");
abort();
} else {
return 60 / x;
}
}
![avatar](http://images.gog.com/c5e5ed9261c522e2c05ce01b17e5e325da5d464a04084047e1007640416e3a61_avm.jpg)
(Rust fixes this issue by having the assignment return (), and by having if statements require boolean values, so the code fails to compile.)
(Python fixes this by not allowing assignments in the middle of expressions; trying to compile the corresponding code will give you a syntax error.)