Not Operator

Negates an expression by inverting the bit values.

αƒ‘αƒ˜αƒœαƒ’αƒαƒ₯αƒ‘αƒ˜


Result = Not Expression

Parameters:

Result: Any numeric variable that contains the result of the negation.

Expression1, Expression2: αƒœαƒ”αƒ‘αƒ˜αƒ‘αƒ›αƒ˜αƒ”αƒ αƒ˜ αƒͺαƒ˜αƒ€αƒ αƒ£αƒšαƒ˜ αƒ‘αƒ˜αƒ“αƒ˜αƒ“αƒ”αƒ”αƒ‘αƒ˜ αƒαƒœ αƒ‘αƒ’αƒ αƒ˜αƒ₯αƒαƒœαƒ”αƒ‘αƒ˜, αƒ αƒαƒ›αƒšαƒ”αƒ‘αƒ˜αƒͺ αƒ’αƒ˜αƒœαƒ“αƒαƒ— შეადაროთ.

When a Boolean expression is negated, the value True changes to False, and the value False changes to True.

In a bitwise negation each individual bit is inverted.

αƒ›αƒαƒ’αƒαƒšαƒ˜αƒ—αƒ˜:


Sub ExampleNot
Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant
Dim vOut As Variant
    vA = 10: vB = 8: vC = 6: vD = Null
    vOut = Not vA ' Returns -11
    vOut = Not(vC > vD) ' Returns -1
    vOut = Not(vB > vA) ' Returns -1
    vOut = Not(vA > vB) ' Returns 0
End Sub

Please support us!