3.5.10.8 XOR

Description

Minimum Origin Version Required: 2019 SR0

This function is used to return XOR operation of two logical values n1 and n2. XOR operation returns TRUE when either logical value is TRUE, and returns FALSE when both logical values are TRUE or FALSE.

Syntax

bool XOR(bool n1, bool n2)

Parameters

n1

the first condition to be evaluated whether TRUE or FALSE. It can be a logical formula. If a non-zero numeric is specified, it is treated as TRUE. If zero is specified, it is treated as FALSE.

n2

the second condition to be evaluated whether TRUE or FALSE. It can be a logical formula. If a non-zero numeric is specified, it is treated as TRUE. If zero is specified, it is treated as FALSE.

Return

Return a XOR operation of two logical values.

Example

XOR(1>0,7>2) =; //both TRUE. Return 0
XOR(1<0,7<2) =; //both FALSE. Return 0
XOR(1>0,7<2) =; //1st TRUE 2nd FALSE. Return 1

See Also

BitXOR