XLAM(IX,IY) = XLAM(IX,IY) + ADD
here XLAM(IX,IY) is written on both sides of the equation what does it mean? please explain
XLAM(IX,IY) = XLAM(IX,IY) + ADD
here XLAM(IX,IY) is written on both sides of the equation what does it mean? please explain
Fortran is not math, and the code you cited says to augment the value stored in XLAM(IX,IY)
by ADD
. You will see this in any imperative (as opposed to functional) programming language. You can write
x = x + add
if x
is a scalar or an array. I suggest reading a Fortran tutorial or book.
In Fortran the assignment notation is =
and the equality test is ==
.
In some languages like Pascal or Algol the assignment is :=
and the test is =
, which is clearer. But most languages use =
like Fortran, it’s not the mathematical =
.