Logical Boolean OR Operator (FPScript)
Carries out a logical Boolean OR operation for two expressions.
Syntax
Expression1 Or Expression2
The syntax of the Or operator consists of the following elements:
Element |
Description |
---|---|
Expression1 |
An expression that results in TRUE, FALSE or any numeric scalar value. For the numeric result, all values not equal to zero are taken to be TRUE. |
Expression2 |
Same as Expression1. |
Remarks
If one of the expressions returns a list, then the first element in the list is taken, as long as it is not also a list. Otherwise, the extraction process is repeated recursively. All other elements of the list are ignored.
The result is a Boolean value that results from the following Boolean table:
Expression1 |
Expression2 |
Result |
---|---|---|
FALSE |
FALSE |
FALSE |
TRUE |
FALSE |
TRUE |
FALSE |
TRUE |
TRUE |
TRUE |
TRUE |
TRUE |
You can link several operations together. The expressions are evaluated beginning from the left only up to the first expression that returns TRUE.
If Expression1 or Expression2 is a quantity, then it has to have the SI dimension 1 and it will be transformed to the unit 1 before conversion.
Available in
FlexPro View, Basic, Professional, Developer Suite
Example
If Maximuma(Signal2) > 3 Or Maximum(Signal2) > 3 Then ... End |
Carries out a block of code if at least one maxima of the signals lies above the value 3. |
0 Or 2 Pi |
Returns TRUE, since the unit Pi has the SI dimension 1 and 2 Pi transformed to the unit 1 results in the value 6.2831853, which is not equal to zero. |