views:

223

answers:

2

AND, OR, XOR and NOT I understand. What I don't get are IMP and EQV. What do they mean? How'd they get in there? Is there any real use for them?

+7  A: 

IMP is "material implication" "a implies b" or "if a then b", which is equivalent to NOT a OR b. EQV is "equivalence" or "if and only if", so a EQV b is the same as (a IMP b) AND (b IMP a).

They got there because someone wanted to be complete. They can shorten some logical expressions, but you can always express the same thing with NOT and AND, NOT and OR, or with XOR alone.

Charlie Martin
+1. You could add some linkage to the VB6 reference manual topics on IMP and EQV. http://msdn.microsoft.com/en-us/library/aa242794(VS.60).aspx and http://msdn.microsoft.com/en-us/library/aa242780(VS.60).aspx
MarkJ
I *could*, but that would mean finding them. Ick. Thanks for doing so yourself,.
Charlie Martin
A: 

IIRC, they both perform a bitwise !XOR on the two inputs and return the result.

They are not present in any of the .Net code base (unless you count the VB6 compatibility layer library) so should be considered deprecated and therefor ignored.

Off the top of my head I can't say as I've ever used them.

David Spillett