Quote:
|
Originally Posted by JJG13
I try to do whatever is most readable but instead of
Code:
if (y > 5)
x = 1;
else
x = 0;
I would use
|
yes, just remember that not all compilers treat logical TRUE as 1. it's fine to use it as long as you know it works. more robust, however, is the ternary: