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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Language</strong> <strong>Reference</strong><br />

Note that the operators .NEQV. and .XOR. perform the same logical operation.<br />

The following tables describe the result of the logical operators when they are used with integer operands.<br />

These operators apply to bits in the operand(s), hence we show only the result of operations on individual<br />

bits. The way to read the entries in the following tables is:<br />

1. If the bit in "x" is 0 then the corresponding bit in ".NOT.x" is 1, and so on.<br />

2. If the bit in "x" is 1 and the corresponding bit in "y" is 1 then the corresponding bit in "x.AND.y"<br />

is 1, and so on.<br />

x<br />

.NOT. x<br />

0 1<br />

1 0<br />

x y x .AND. y<br />

1 1 1<br />

1 0 0<br />

0 1 0<br />

0 0 0<br />

x y x .OR. y<br />

1 1 1<br />

1 0 1<br />

0 1 1<br />

0 0 0<br />

x y x .EQV. y<br />

1 1 1<br />

1 0 0<br />

0 1 0<br />

0 0 1<br />

x y x .NEQV. y<br />

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

1 1 0<br />

1 0 1<br />

0 1 1<br />

0 0 0<br />

Note that the operators .NEQV. and .XOR. perform the same mathematical operation on bits.<br />

182 Logical Expressions

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

Saved successfully!

Ooh no, something went wrong!