SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 16/06/2010, 06:18 PM   #1
Vince
Godfather
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 6,100
Reputation: 1623
Default Operators: <<= and >>=

Hi

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.
__________________
I will rarely post a ready made solution in your thread, but rather I try to make you realize your own mistakes so you can fix them yourself.
Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.
Vince is offline  
Old 16/06/2010, 06:20 PM   #2
(SF)Noobanatior
Gangsta
 
Join Date: Dec 2006
Posts: 540
Reputation: 1
Default 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.
(SF)Noobanatior is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
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


All times are GMT. The time now is 04:57 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.