
Originally Posted by
MarkCuering
Code:
if(MyFunc()[0])
{
anObject = MyFunc()[1];
}
what kind of function call is that?
unless ur function returns an array, why not reference the array directly.. obviously that is bad code.. anybody can see that..

Originally Posted by
MarkCuering
and I seldom/haven't seen a code casting some variable to boolean type, integer can be treated as boolean values, however boolean type variables are two bits size only.
that is why if you don't have implicit conversion, ur integer in if statement will resort to a compiler error..
this:
Code:
if (oldChoice = getChoice())
is totally different from this:
Code:
if (oldChoice == getChoice())
so if you want to be clear, its better to put the function on the left side
Code:
if (getChoice() == oldChoice)
or.. as i have suggested earlier, the constant on the left side..
Code:
if (8080 == port)
if ("YES" == response)
if (true == choice)