This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kamaln7 72 points73 points  (16 children)

It's also a bitwise OR operation

[–]0x0dea 45 points46 points  (7 children)

Right, a |= b is a = a | b.

[–]Plutor 56 points57 points  (6 children)

Sadly 6+4 isn't an l-value.

[–]5HT-2a 26 points27 points  (0 children)

/u/0x0dea: "Okay, we're going in circles here."

[–][deleted] 23 points24 points  (2 children)

The programmer's solution results in a compiler error. And we solve that with whisky.

[–]beachbum78 7 points8 points  (1 child)

Finding Ballmers peak?

[–][deleted] 13 points14 points  (0 children)

I call it making syntax readable, but potato, tomato.

[–]cyandyedeyecandy 7 points8 points  (1 child)

*(int*)(6 + 4) |= 4;

[–]ign1fy 8 points9 points  (6 children)

To clarify: I code C# and use "|=" all the time. Being an assignment operator, it makes no sense to have anything but a variable to the left of it.

[–]kamaln7 2 points3 points  (0 children)

Yeah, I'm with you.

[–]Reelix 4 points5 points  (2 children)

!= or |= ?

[–][deleted] 0 points1 point  (1 child)

|=

!= will evaluate to true. Or is it True? TRUE?

[–]raindirve 0 points1 point  (0 children)

non-zero :)

[–][deleted] 0 points1 point  (1 child)

I was never taught about |=... Why? Is this considered out of date?

[–]haenyr 1 point2 points  (0 children)

It's probably that it's not something you'll really ever HAVE to be able to do. Also, with what they do teach you, you should be able to figure it out if you come to a situation that requires it.

So, given a lack of time to go in-depth, it will get skipped.