Unitary | Pre-APOGEE | APOGEE | BACnet | PXC.A |
---|---|---|---|---|
● | ● | ● | ● | ● |
Syntax
If (cond1.AND.cond2) then...
cond1,cond2 | Defines a condition that is the result of a comparison between two values. |
Use
- Used to compare two logical conditions.
- If both conditions are true, the result of the comparison is true.
- A single statement can incorporate a combined total of 16 relational and logical operators.
See Table 1-1 for a comparison of conditions used with the .AND. logical operator:
Table1-1. Truth Table for .AND. Logical Operator. | ||
---|---|---|
| Condition 1 False | Condition 1 True |
Condition 2 False | Result is False | Result is False |
Condition 2 True | Result is False | True |
Example
200 IF (TIME LT.19:00.AND.TIME.GT.5:00) THEN ON(LIGHTS)