Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Xor - operator of language VBScript

Description:
Used to perform a logical exclusion on two expressions
Syntax:
result = expression1 Xor expression2
Note:
If one, and only one, of the expressions evaluates to true, result is true. Result is determined according to the following table:
expression1: expression2: result:
true true false
true false true
false true true
false false false
 
The operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following table:
If bit in expression1 is: and bit in expression2 is: then result is:
0 0 0
0 1 1
1 0 1
1 1 0
 
The Xor operator executed for multiple expressions simultaneously (e.g. v1 Xor v2 Xor ... Xor vN) returns:
- true if the number of expressions is uneven (N is uneven number)
- false if the number of expressions is even (N is even number)
See also:
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice