plfiorini / opencl-book-samples

Automatically exported from code.google.com/p/opencl-book-samples
0 stars 0 forks source link

Error in description of conditional operator (p. 129) #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 emil.sty...@gmail.com on 11 Aug 2011 at 1:03