A.1.2    Operations
 

Available mathematic operations for Fortran 90
Operator
Description
+
Addition
-
Subtraction
*
Multiplication
/
Division
**
Exponentiation
______________________________________

Order of actions:

  1. Exponents are perform first, from right to left.
  2. Multiplications and divisions are performed next, from left to right with the order they are encountered.
  3. Addition and subtraction are last.  They are also performed from left to right with the order they are encountered.
     

Available logical opertations for Fortran 90

Operator
.NOT.
.AND.
.OR.
.EQV.
.NEQV.
______________

.NOT.a returns .TRUE. if a is .FALSE. and vice-versa. The values of Logical Expressions that involve two variables are given below:

If operands a and b are: Then the expressions below evaluate as shown:
a .AND. b
a .OR. b
a .EQV. b
a .NEQV. b
Both true
.TRUE.
.TRUE.
.TRUE.
.FALSE.
One true, one false
.FALSE.
.TRUE.
.FALSE.
.TRUE.
Both false
.FALSE.
.FALSE.
.TRUE.
.FALSE.

 

Note 1: Operator .NEQV. is sometimes referred as .XOR.

Note 2: Remember:

.NOT.(a.AND.b) = (.NOT.a) .OR. (.NOT.b)

.NOT.(a.OR.b) = (.NOT.a) .AND. (.NOT.b)