FORTRAN Concepts

FORTRAN-80

Fig. 2w$ ·.type,. Length, andJnterpretatbin o~(O~1**QP2)

As these figures indicate, mixed-mode arithmetic is done by converting both operands to the same type (the type of the result) before performing the operation. This conversion is unnecessary when a real number is raised to an integer power.

In the case of an integer divided by another integer, the remainder is truncated.

The value of 1/3 is 0

The value of 8/3 is 2

The value of -8/3 is -2

If the magnitude of an arithmetic result is too large for the processor to represent in the number of bytes shown in these figures, the result is undefined. See section F.I.

2.2.4.3 Relational Expressions

Relational expressions compare two arithmetic or two character expressions and return a TRUE or FALSE result of type logical.

2.2.4.3.1Relational Operators. The relational operators are:

Operator

Meaning

.LT.

Less than

.LE.

Less than or equal

.EQ.

Equal

.NE.

Not equal

.GT.

Greater than

.GE.

Greater than or equal

2-8

Page 20
Image 20
Intel fortran-80 manual Relational Expressions