View Single Post
Old 09-16-2020, 03:57 PM   #12
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,950
Default

You first get the current value of projshowgrid, then you set the first bit of it (that's what the '&1' in the doc is saying) to 1 (on) by bitwise ORing it with 1 (binary ...000001) because
0 OR 1 == 1 and
1 OR 1 == 1
so it's set to 1 no matter of the previous state (the other bits stay the same because 1 OR 0 == 1 and 0 OR 0 == 0).
https://en.wikipedia.org/wiki/Bitwise_operation#OR

Sorry, Wiki probably does a better job explaining than me..

Last edited by nofish; 09-16-2020 at 04:21 PM.
nofish is offline   Reply With Quote