opencl-book-samples icon indicating copy to clipboard operation
opencl-book-samples copied to clipboard

Error in description of conditional operator (p. 129)

Open GoogleCodeExporter opened this issue 9 years ago • 0 comments

On page 129 (Conditional Operator):

"If the result is a scalar value, the second expression, expr2, is evaluated if 
the result compares equal to 0; otherwise the third expression, expr3, is 
evaluated."

This is the exact opposite of the usual ?: semantics.  I guess it should say 
"compares UNequal to 0" instead.

Original issue reported on code.google.com by [email protected] on 11 Aug 2011 at 1:03

GoogleCodeExporter avatar Mar 14 '15 09:03 GoogleCodeExporter