LibreOfficeDev 24.2 Help
3PFwA‖Logically combines two expressions.
jairQ‖Result = Expression1 And Expression2
YodEf‖ Result: Any numeric variable that records the result of the combination.
3E7ts‖ Expression1, Expression2: Any expressions that you want to combine.
iXktT‖Boolean expressions combined with AND only return the value True if both expressions evaluate to True:
exVTP‖ True AND True returns True; for all other combinations the result is False.
B6iuu‖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
fa63f‖ vVarOut = A > B And B > C ' returns -1
xdJyW‖ vVarOut = B > A And B > C ' returns 0
Uqvg4‖ vVarOut = A > B And B > D ' returns 0
AmHnv‖ vVarOut = (B > D And B > A) ' returns 0
yVkEf‖ vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments
End Sub