user1343318
user1343318

Reputation: 2141

What does the '=|' operator do?

I googled but it doesn't return the results related to expression. I am guessing it has something to do with bits. What exactly does =| do?

Upvotes: 2

Views: 143

Answers (1)

Dmitrii Bychenko
Dmitrii Bychenko

Reputation: 186823

Look at this

http://www.tutorialspoint.com/cprogramming/c_operators.htm

So

  |   inclusive bitwise OR
  =   assignment
  |=  bitwise inclusive OR and assignment 
  =|  syntax error

As for |=

  a |= b;

equals to

  a = a | b;

Upvotes: 3

Related Questions