== .eq. 检查两个操作数的值相等与否，如果是，则条件变为真。 (A == B) i不为 true.
/= .ne. 检查，两个操作数的值相等与否，如果值不相等，则条件变为真。 (A != B) 为 true.
> .gt. 检查，左操作数的值大于右操作数的值，如果是的话那么条件为真。 (A > B)不为true.
< .lt. 检查，左操作数的值是否小于右操作数的值，如果是的话那么条件为真。 (A < B) 是 true.
>= .ge. 检查，左边的操作数的值是否大于或等于右操作数的值，如果是，则条件变为真。 (A >= B) 不为 true.
<= .le. 检查，左边的操作数的值是否小于或等于右操作数的值，如果是，则条件变为真。 (A <= B) 为 true.

```program logicalOp

! this program checks logical operators
implicit none

! variable declaration
logical :: a, b

! assigning values
a = .true.
b = .false.

if (a .and. b) then
print *, "Line 1 - Condition is true"
else
print *, "Line 1 - Condition is false"
end if

if (a .or. b) then
print *, "Line 2 - Condition is true"
else
print *, "Line 2 - Condition is false"
end if

! changing values
a = .false.
b = .true.

if (.not.(a .and. b)) then
print *, "Line 3 - Condition is true"
else
print *, "Line 3 - Condition is false"
end if

if (b .neqv. a) then
print *, "Line 4 - Condition is true"
else
print *, "Line 4 - Condition is false"
end if

if (b .eqv. a) then
print *, "Line 5 - Condition is true"
else
print *, "Line 5 - Condition is false"
end if

end program logicalOp```

```Line 1 - Condition is false
Line 2 - Condition is true
Line 3 - Condition is true
Line 4 - Condition is true
Line 5 - Condition is false```