Diff between EQV function, and the AND function

  • Thread starter Claton Hendrikcs
  • Start date
C

Claton Hendrikcs

Hi Guys!

Can any one Explain what is the difference between the
EQV and AND function and the IMP and OR Funtions

Regards,
CLATON HENDRICKS
 
D

Dirk Goldgar

Claton Hendrikcs said:
Hi Guys!

Can any one Explain what is the difference between the
EQV and AND function and the IMP and OR Funtions

They are operators, not functions. Have you looked at the VB help
topics for these operators? They have input/result tables that ought to
make the differences clear.

Note that these operators may be used as logical conjunctions or as
bitwise operators. When used as logical conjunctions, this is how they
work if neither operand is Null:

a AND b --> True if both a and b are True; False otherwise.

a EQV b --> True if both a and b are True or both a and b are False;
False otherwise.

a OR b --> True if either a or b is True, or if both are True.

a IMP b --> True if a and b are both True, or if a is False.
Essentially, it's an assertion that "a implies b"; that is, if a is
true, b must be true, but if a is false, b maybe true or false without
affecting the truth of the assertion.

There are special rules that come into play for each operator when
either of the operands is Null. See the help file topic for details.

When used as bitwise operators, the same logic is applied as stated
above, but for each pair of bits in the operands rather than for the
truth or falsehood of the operands as a whole.
 
J

John Vinson

Hi Guys!

Can any one Explain what is the difference between the
EQV and AND function and the IMP and OR Funtions

Regards,
CLATON HENDRICKS

A "Truth Table" is how I see these logical operations most clearly:

AND

True False
True True False
False False False

OR

True False
True True True
False True False

EQV

True False
True True False
False False True

IMP

True False
True True False
False True True
 

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