see whatever i'm trying to achieve .. some form of execution.. i could've done with
" if(variablename!=0) " .. correct? instead i saw this convention somewhere and i want to know why its used..
It is valid syntax. The choice is yours - either will work. Some people get into the habit of putting the value first so that they cannot make the common mistake of writing: if ( variable = 0)
when they meant to write if (variable == 0)
Both will compile and work, but they are very different.
Turning round the order means that writing
if ( 0 = variable)
by mistake will cause a compile-time error, and only if ( 0 == variable) will work.