|16/06/2010, 06:18 PM||#1|
Join Date: Sep 2007
Operators: <<= and >>=
I was reading this page: http://wiki.sa-mp.com/wiki/Keywords:Initialisers when I came across some symbols that I haven't used yet:
Symbols like <<= and >>>= etc. What are they called, what do they do and what are they useful for?
Couldn't find anything about it.
I hope someone can explain it.
|16/06/2010, 06:20 PM||#2|
Join Date: Dec 2006
Re: Operators: <<= and >>=
*= v *= e multiplies v with e
/= v /= e divides v by e.
%= v %= e assigns the remainder of the division of v by e to v.
>>= v >>= e shifts v arithmetically to the right by e bits.
>>>= v >>>= e shifts v logically to the right by e bits.
<<= v <<= e shifts v to the left by e bits.
&= v &= e applies a bitwise “and” to v and e and assigns the result to v.
|= v |= e applies a bitwise “or” to v and e and assigns the result to v.
^= v ^= e applies a bitwise “exclusive or” to v and e and assigns the result to v.
|Thread||Thread Starter||Forum||Replies||Last Post|
|[2 Random Questions] About zcmd/dcmd and some math operators||[Marevin*]||Help Archive||8||06/11/2009 03:00 PM|
|2 operators that i don't understand||ғαιιοцт||Help Archive||19||27/02/2009 04:50 PM|