I guess \r is case insensitive - I might be wrong though.
But what I can explain is the ?: operator. It's the only ternary operator we have! It has the form:
And this means...
If a evaluates to true (non-zero), the value of the expression is b. Otherwise, the value of the expression is c.
So,
stands for 10 if a is true and 5 if a is false. In your case:
Code:
(option & (1<<0)) ? "ON" : "OFF"
1<<0 is still 1 which is the lowest significant bit; so option & 1 will be only non-zero if the lowest significant bit in option is set (-> if the number is odd). Then, "ON" will be used. Otherwise, "OFF".
__________________