LOGICAL

Concept Link IconSee also Concept Link IconExample

Logical bitwise operation on 32-bit integers.

WebVue support - Yes.

Mode Mnemonic Syntax
0 NOT 1
1 AND 2
2 XOR 2
3 OR 2
4 SHIFT_LEFT 2
5 SHIFT_RIGHT 2
6 MODULO 2

Syntax 1

LongVal = LOGICAL(Mode, x);

Return type: LONG.

Argument Format
x Any numeric type. It is converted to type LONG.

Execution

Mode Mnemonic Action
0 NOT Logical NOT.

Syntax 2

LongVal = LOGICAL(Mode, x, y);

Return type: LONG.

Argument Format
x Any numeric type. It is converted to type LONG.
y Any numeric type. It is converted to type LONG.

Execution

Mode Mnemonic Action
1 AND Logical AND.
2 XOR Logical XOR.
3 OR Logical OR.
4 SHIFT LEFT Bit shift to the left.
5 SHIFT RIGHT Bit shift to the right.
6 MODULO Modulus.

Example

For an example, select the Example link above.