Bitwise Boolean OR Operator (|) (FPScript)

23.08.2021

Performs a bitwise Boolean OR operation for two expressions.

Syntax

Expression1 | Expression2

The syntax of the | operator consists of the following elements:

Element

Description

Expression1

An integral expression

Expression2

Same as Expression1.

Remarks

The two expressions are processed bitwise according to the following Boolean table:

|

0

1

0

0

1

1

1

1

All integer data types except Boolean values are permitted. If one argument is numeric and the other is a string, the string is changed to numeric type before the operation. Both arguments cannot be strings.

The operator can process scalar values or entire data series and data matrices. If at least one argument is a data series or a data matrix, the operation takes place on a per-element basis and the result is once again a data series or a data matrix. If at least one of the two arguments is a data matrix, then both arguments must have the same number of rows. For a different number of columns in data matrices or for a different number of rows in data series, extra columns or values are removed.

If signals, signal series or space curves are combined, only their Y components are taken into consideration. The result then preferably contains the X component and possibly the Z component of Expression1. Otherwise, it contains those of Expression2. If one of the expressions returns a list, then the operation is executed for each item in the list and the result is also a list.

Available in

FlexPro View, Basic, Professional, Developer Suite

Example

0xa | 0xc

Returns 1010b | 1100b = 1110b = 14.

{False, True, False, True} | {False, False, True, True}

Returns {False, True, True, True}.

 

See Also

Bitwise Boolean AND Operator

Bitwise Boolean Exclusive OR Operator

Bitwise Boolean NOT Operator

Logical Boolean OR Operator

Share article or send as email:

You might be interested in these articles