Recently, in view of the camera drive, I found a paragraph so written for me this little white was a bit of a monk. Finally think of it is nothing but the C language of the three-mesh operator nesting. The above figure is equivalent to Ireg = Ireg < 0x10?0x10: (Ireg>0xf8?0xf8:ireg); The value of Ireg is understood to be compared with 0x10, less than 0x10 to 0x10. Take (Ireg>0xf8?0xf8:ireg) This value if it is not established. One more judgment. Write it, Mark.
Then the three-mesh operation on the C language was measured again.
Change Order enter above four values:
When you summarize the use of conditional expressions, you should also note the following points:
1. The operation precedence of the conditional operator is lower than the relational and arithmetic operators, but is higher than the assignment character. So max= (a>b) a:b can remove parentheses and write as Max=a>b?a:b
2. The conditional operator? And: is a pair of operators that cannot be used separately.
3. The binding direction of the conditional operator is from right to left.
For example:
A>b?a:c>d?c:d should be understood as
A>b?a: (C>D?C:D) This is the case where the conditional expression is nested, where the expression 3 is a bar
A piece of expression.