Or

Top  Previous  Next

Prototype

 

BoolValue:=BoolInput1 Or BoolInput2

 

Description

 

Returns TRUE if one of input value are true

 

Parameters

 

BoolInput1: first input Boolean value.

 

BoolInput2: second input Boolean value.

 

Returned Value

 

BoolValue: Or result Boolean value

 

Notes

 

None.

 

Example

 

// It initializes X and Y integer variable

X:=2;

Y:=1;

 

//It calculates Or operation

BoolOutXX:=(X=X) Or (X=X);

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

 

//It logs result

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

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

 

 

// It initializes two boolean variables

FoundValueX:=True;

FoundValueY:=False;

 

//It calculates And

BoolOut:=FoundValueX Or FoundValueY;

 

//It logs result

ApplicationLog('OR function result is: '+BooltoStr(BoolOut));