Assignment
Statement
The Assignment
Statement in FORTRAN assigns a value to a variable.
The general form is:
variable = expression
Exception
-
integer values can be assigned to real variables
-
real
values can be assigned to integer variables
Example:
INTEGER
M , N
REAL
A , B
A = 6.2
B = A + 9/2
M = B
N = B + 1.6
A = N
A = M + N
N = A + B
M = N + 3 **3.0