25.03.2013, 18:20
Well, if you are interested, then learn about Yoda conditionals (I learned it from symfony coding standards).
Instead
you do
Why? Sometimes people make typos. And we are people. So if there was
Then you'd get random assignemnt istead of comparison
Syntax error, assigning variable to constant.
Note:
In PAWN we have "warning 211: possibly unintended assignment;", but still this is useful if you operate with a number of languages
Instead
pawn Код:
if(variable == 5)
pawn Код:
if(5 == variable)
pawn Код:
if(variable = 5)
pawn Код:
if(5 = variable)
Note:
In PAWN we have "warning 211: possibly unintended assignment;", but still this is useful if you operate with a number of languages