Operator |= - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Operator |= (
/showthread.php?tid=266914)
Operator |= -
Kwarde - 06.07.2011
Hello.
I was just wondering, what for an effect does this have?
Or I don't even know how to use it, so that's why I'm asking it. I read the pawn language guide, which said:
v |= e . applies a bitwise "or" to v and e and assigns the result to v.
But I still don't understand it

- Can someone please explain it, with examples? Thanks in advance.
- Kevin
Re: Operator |= -
RyDeR` - 06.07.2011
https://sampforum.blast.hk/showthread.php?tid=177523
It's the same as "v = v | e". If you read what '|' does in that topic you'll understand it immediately.
Re: Operator |= -
Kwarde - 06.07.2011
Ah yes, I do understand it. So 'x |= y' is just a faster way then 'x = x | y'. And omg that's not actually a question, because you told exact the same. Nevermind that.
Thank you, I do understand it now