Xor

D

Dave Neve

HiI can't get to grips with Xor.The program below is provided by VBA to help
understand the operator but I still can't quite figureout it's logic.Thanks
in advanceDim A, B, C, D, MyCheck
A = 10: B = 8: C = 6: D = Null ' Initialise les variables.
MyCheck = A > B Xor B > C ' False.
MyCheck = B > A Xor B > C ' True.
MyCheck = B > A Xor C > B ' False.
MyCheck = B > D Xor A > B ' Null.
MyCheck = A Xor B ' 2 (comparaison au niveau du bit).
 
W

Word Heretic

G'day "Dave Neve" <[email protected]>,

Its simple. It only returns a true or, NOT an AND

So, if we set Test1 as True and Test2 as false, the XOR is true as the
OR is true but the AND is false.

If we set Test2 to True as well, XOR is False as the And is True.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Dave Neve reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top