Xor-Operator [Runtime]/text/sbasic/shared/03060600.xhpSun Microsystems, Inc.converted from old format - fpeXor operator (logical)Xor-Operator [Runtime]Performs a logical Exclusive-Or combination of two expressions.Syntax:Result = Expression1 Xor Expression2Parameters:Result: Any numeric variable that contains the result of the combination.Expression1, Expression2: Any numeric expressions that you want to combine.A logical Exclusive-Or conjunction of two Boolean expressions returns the value True only if both expressions are different from each other.A bitwise Exclusive-Or conjunction returns a bit if the corresponding bit is set in only one of the two expressions.Example:Sub ExampleXorDim vA as Variant, vB as Variant, vC as Variant, vD as VariantDim vOut as VariantvA = 10: vB = 8: vC = 6: vD = NullvOut = vA > vB Xor vB > vC REM returns 0vOut = vB > vA Xor vB > vC REM returns -1vOut = vA > vB Xor vB > vD REM returns -1vOut = (vB > vD Xor vB > vA) REM returns 0vOut = vB Xor vA REM returns 2End Sub