LibreOffice 24.8 Help
Logically combines two expressions.
āļ´āˇâāļģāļāˇāļĩāļŊāļē = āļ´āˇâāļģāļāˇāˇāļąāļē1 + āļ´āˇâāļģāļāˇāˇāļąāļē2
Result:āˇāļāļāļŊāļąāļēāˇ āļ´āˇâāļģāļāˇāļĩāļŊāļē āļ āļŠāļāļāˇ āˇāļą āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļāˇāļ¸āļ āˇāˇāļ āļŊāˇâāļēāļēāļāˇ.
Expression1, Expression2: āļāļļāļ§ āˇāļ¸āˇāļļāļąāˇāļ° āļāļģāˇāļ¸āļ§ āļ āˇāˇāˇâāļē āļāļąāˇāļ¸ āˇāļāļāˇâāļēāˇāļāˇāļ¸āļ āļ´āˇâāļģāļāˇāˇāļąāļēāļąāˇ.
Boolean expressions combined with AND only return the value True if both expressions evaluate to True:
True AND True returns True; for all other combinations the result is False.
The AND operator also performs a bitwise comparison of identically positioned bits in two numeric expressions.
Sub ExampleAnd
Dim A As Variant, B As Variant, C As Variant, D As Variant
Dim vVarOut As Variant
A = 10: B = 8: C = 6: D = Null
vOut = vA > vB Xor vB > vD REM returns -1
vOut = (vB > vD Xor vB > vA) REM returns 0
vOut = (vB > vD Xor vB > vA) REM returns 0
vOut = (vB > vD Xor vB > vA) REM returns 0
vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments
End Sub