Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Fully qualified name: Std.Logical.Xor
function Xor(first : Bool, second : Bool) : Bool
Summary
Returns the boolean exclusive disjunction (eXclusive OR, XOR) of two input boolean values.
Input
first
The first boolean value to be considered.
second
The second boolean value to be considered.
Output
A Bool which is true if and only if exactly one of first and second is true.
Remarks
In Q#, Xor(a, b) is equivalent to a != b.
Example
let result = Xor(true, false);
// result is true