September 1998
Intermediate to advanced
848 pages
20h 13m
English
? : takes three operands, each of which is an expression. They are arranged this way: expression1 ? expression2 : expression3. The value of the whole expression equals the value of expression2 if expression1 is true, and equals the value of expression3 otherwise.
( 5 > 3 ) ? 1 : 2 has the value 1.
( 3 > 5 ) ? 1 : 2 has the value 2.
( a > b ) ? a : b has the value of the larger of a or b.
Read now
Unlock full access