Xor

Top  Previous  Next

Prototype

 

BoolValue:=BoolInput1 Xor BoolInput2

 

Description

 

Returns TRUE if only one of input value are true

 

Parameters

 

BoolInput1: first input Boolean value.

 

BoolInput2: second input Boolean value.

 

Returned Value

 

BoolValue: Xor result Boolean value

 

Notes

 

None.

 

Example

 

// It initializes X and Y integer variable

X:=2;

Y:=1;

 

//It calculates Xor operation

BoolOutXX:=(X=X) Xor (X=X);

BoolOutXY:=(X=X) Xor (X=Y);

 

//It logs result

ApplicationLog('The Xor between X and X is: '+BooltoStr(BoolOutXX));

ApplicationLog('The Xor between X and Y is: '+BooltoStr(BoolOutXY));