Logical Boolean AND Operator (FPScript)
Carries out a logical Boolean AND operation for two expressions.
Syntax
Expression1 And Expression2
The syntax of the And 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 |
FALSE |
FALSE |
TRUE |
FALSE |
TRUE |
TRUE |
TRUE |
You can link several operations together. The expressions are evaluated beginning from the left only up to the first expression, which returns FALSE.
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 Minimum(Signal) > 3 And Maximum(Signal) < 5 Then ... End |
Carries out a block of code if the signal lies in the range [3, 5]. |
1 And 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. |