24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Expressions<br />

7.4.1 Logical Operators<br />

The following table lists the logical operators and the operation they perform.<br />

<br />

Operator<br />

.NOT.<br />

.AND.<br />

.OR.<br />

.EQV.<br />

.NEQV.<br />

.XOR.<br />

Logical Operation<br />

Logical negation<br />

Logical conjunction<br />

Logical inclusive disjunction<br />

Logical equivalence<br />

Logical non-equivalence<br />

Exclusive or<br />

The logical operator .NOT. is a unary operator; all other logical operators are binary. The following tables<br />

describe the result of each operator when it is used with logical operands.<br />

<br />

x<br />

true<br />

false<br />

.NOT. x<br />

false<br />

true<br />

x y x .AND. y<br />

true true true<br />

true false false<br />

false true false<br />

false false false<br />

x y x .OR. y<br />

true true true<br />

true false true<br />

false true true<br />

false false false<br />

x y x .EQV. y<br />

true true true<br />

true false false<br />

false true false<br />

false false true<br />

x y x .NEQV. y<br />

................ x .XOR. y<br />

true true false<br />

true false true<br />

false true true<br />

false false false<br />

Logical Expressions 181

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!