08.01.2015, 21:43
In addition to what Willian_Luigi already said:
a |= b means a = a | b
just like a += b means a = a + b
| is a binary OR operator, meaning the OR operator is performed for each bit.
& is binary AND. So AND will be performed for each bit. The resulting bit at a certain position will only be true if both bits at the same position for both parameters are true.
There are plenty of tutorials and explanations for this, so feel free to use the search if you want to learn more about binary operators.
a |= b means a = a | b
just like a += b means a = a + b
| is a binary OR operator, meaning the OR operator is performed for each bit.
& is binary AND. So AND will be performed for each bit. The resulting bit at a certain position will only be true if both bits at the same position for both parameters are true.
There are plenty of tutorials and explanations for this, so feel free to use the search if you want to learn more about binary operators.