Quote:
Originally Posted by felgall
A longer version of the same code that does exactly the same thing using if statements instead of ternary operators is:
Code:
if ((next - present) == 356) x = 2;
else if ((present - last) == 382) x = 1;
else x= 0;
|
Longer, but much clearer. Doubt if there is any discernable speed difference.