GOOC - Game Oriented Object C
GOOC - Game Oriented Object C
7.11. Conditional Expressions
7.11. Conditional Expressions
You use the conditional operator to cause the entire conditional expression to evaluate to either its second or its third operand, based on the truth value of its first operand. Here’s an example:
a ? b : c
If expression a is true, then expression b is evaluated and the result is the value of b. Otherwise, expression c is evaluated and the result is c.