User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 158
9.2.58 OR
Syntax [Operator]
E1 OR E2
Purpose:
Does a bit-by-bit OR between the 2 integers E1 and E2.
WARNINGS:
• When executed on float elements (float constant or float variable), the OR functions returns the logical OR operation.
• When executed on integer elements (integer constant or integer variable - like i%), the OR function returns the bitwise OR
operation
• This is NOT true for AND and XOR
• This is historical and is left for compatibility with existing programs
Examples:
• Logical OR:
See also:
“Operators priority” on page 127, “AND” on page 131, “XOR” on page 168
9.2.59 PI
Syntax [function]
PI
Purpose:
The function returns 3.14159265
1 OR 2 REM returns 3
2 OR 2 REM returns 2
3 OR 1 REM returns 3
var1=0.0
var2=0.0
ORResult = var1 OR var2
Print ORresult
rem ORResult = 0.0
var1=0.0
var2=12.0
OR Result = var1 OR var2
Print ORresult
rem ORResult = 1.0