Imp Operator

दो एक्सप्रेशन पर लॉज़िकल इम्प्लीकेशन चलाता है.

Syntax:


परिणाम = एक्सप्रेशन1 Imp एक्सप्रेशन2

पैरामीटर

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

Expression1, Expression2: Any expressions that you want to evaluate with the Imp operator.

If you use the Imp operator in Boolean expressions, False is only returned if the first expression evaluates to True and the second expression to False.

If you use the Imp operator in bit expressions, a bit is deleted from the result if the corresponding bit is set in the first expression and the corresponding bit is deleted in the second expression.

उदाहरण:


Sub ExampleImp
Dim A As Variant, B As Variant, C As Variant, D As Variant
Dim vOut As Variant
    A = 10: B = 8: C = 6: D = Null
    vOut = vA > vB Or vB > vD REM -1
    vOut = vB > vA Or vB > vC REM -1
    vOut = vA > vB Or vB > vD REM -1
    vOut = (vB > vD Or vB > vA) REM 0
    vOut = vB Xor vA REM returns 2
End Sub

Please support us!