Raised This Month: $32 Target: $400
 8% 

[Solved] Operator question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 02-03-2011 , 04:23   [Solved] Operator question
Reply With Quote #1

There is some operator what works with & and | at the same time ?

Something like &| or ^ (XOR)

Last edited by #8 SickneSS; 02-03-2011 at 04:32.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-03-2011 , 05:41   Re: Operator question
Reply With Quote #2

All pawn operators will work with &, | and ^. Your question makes no sense to me. Explain it properly...
__________________
Impossible is Nothing
Sylwester is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 02-03-2011 , 08:08   Re: Operator question
Reply With Quote #3

Quote:
Originally Posted by Sylwester View Post
All pawn operators will work with &, | and ^. Your question makes no sense to me. Explain it properly...
I know that.I mean an operator to work with if(asd &| (AndOR) asd)...I need something to do the XOR in pawn,not || or && I want XOR I tried ^ but sends me tag mismatch.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-03-2011 , 08:21   Re: Operator question
Reply With Quote #4

^ should work. If you are getting tag mismatch then you used it with a wrong type.
You can also mimic XOR using &, | and ~.
p XOR q == (~p | ~q) & (p | q)
__________________
Impossible is Nothing
Sylwester is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 02-03-2011 , 08:35   Re: Operator question
Reply With Quote #5

Quote:
Originally Posted by Sylwester View Post
^ should work. If you are getting tag mismatch then you used it with a wrong type.
You can also mimic XOR using &, | and ~.
p XOR q == (~p | ~q) & (p | q)
Ok,I'll try it,thanks.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-03-2011 , 11:36   Re: [Solved] Operator question
Reply With Quote #6

If you have errors with ^ operator post the code.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 22:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode