S
Saxena
Hi what are the usage scenerio of |= OR Assignment Operator
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi what are the usage scenerio of |= OR Assignment Operator
Hi what are the usage scenerio of |= OR Assignment Operator
Joe said:a = a | b;
Forgive my ignorance, but what does this mean? I can see that it's
assigning some value to "a" based upon the outcome of the RHS, but what
does the RHS actually do? Could you give some examples, and possibly a
scenario where this would be used?
Jeff said:It operates on the values at the bit level. …
* The rules are: 0 | 0 yields 0, any other combination yields 1, meaning if
either bit or both are 1, the result is 1.
Dylan said:Forgive my ignorance, but what does this mean? I can see that it’s
assigning some value to “a†based upon the outcome of the RHS, but what
does the RHS actually do? Could you give some examples, and possibly a
scenario where this would be used?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.