Logical Expressions |
DEVELOPER |
Logical expressions combine relational expressions and logical operators.
Logical operators are as follows:
Operator |
Example |
Result |
AND |
A AND B |
True if both A and B are True |
|
|
|
OR |
A OR B |
True if either A or B is True |
|
|
|
NOT |
NOT (A AND B) |
True if (A AND B) is False |
|
NOT (A OR B) |
True if (A OR B) is False |
|
NOT (A = B) |
True if (A = B) is False |
|
NOT (A < B) |
True if (A < B) is False |
|
NOT (A > B) |
True if (A > B) is False |
|
NOT (A <= B) |
True if (A <= B) is False |
|
NOT (A >= B) |
True if (A >= B) is False |
For >, <, >=, and <= comparisons, PROIV performs a NOT conversion on the relational operator (for example, > becomes <= and <= becomes >) and then evaluates the logical expression. |
When evaluating expressions that contain more than one operator, PROIV follows precedence rules to determine the order in which operations are performed. An operation with higher precedence is evaluated before an operation with lower precedence. Parentheses can be used to alter the normal precedence.
Operator |
Precedence |
NOT |
Highest |
AND |
|
OR |
Lowest |
Topic ID: 520008