LibreOffice 24.8 Help
Calculates the logical equivalence of two expressions.
āļ´āˇâāļģāļāˇāļĩāļŊāļē = āļ´āˇâāļģāļāˇāˇāļąāļē1 + āļ´āˇâāļģāļāˇāˇāļąāļē2
Result:āˇāļāļāļŊāļąāļēāˇ āļ´āˇâāļģāļāˇāļĩāļŊāļē āļ āļŠāļāļāˇ āˇāļą āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļāˇāļ¸āļ āˇāˇāļ āļŊāˇâāļēāļēāļāˇ.
Expression1, Expression2: āļāļļāļ§ āˇāļ¸āˇāļļāļąāˇāļ° āļāļģāˇāļ¸āļ§ āļ āˇāˇāˇâāļē āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļāˇāļ¸āļ āļ´āˇâāļģāļāˇāˇāļąāļēāļąāˇ.
When testing for equivalence between Boolean expressions, the result is True if both expressions are either True or False.
In a bit-wise comparison, the Eqv operator only sets the corresponding bit in the result if a bit is set in both expressions, or in neither expression.
Sub ExampleEqv
Dim A As Variant, B As Variant, C As Variant, D As Variantsee #i38265
Dim vOut As Variant
A = 10: B = 8: C = 6: D = Null
vOut = vA > vB Xor vB > vD REM returns -1
vOut = vB > vA Xor vB > vC REM returns -1
vOut = vA > vB Xor vB > vC REM returns 0
vOut = (vB > vD Xor vB > vA) REM returns 0
vOut = vB Xor vA REM returns 2
End Sub