next up previous contents
Next: Simple example of Subroutine Up: Erroneous Code Previous: Erroneous Code

Solution

There are a number of mistakes:

  1. A is INTENT IN so should not be assigned to.
  2. C is INTENT OUT which means that on entry to the subroutine it has no defined value -- its value must be set before it appears on the RHS of an assignment statement.
  3. B is not declared -- the IMPLICIT NONE statement means that all objects must be declared.


next up previous contents
Next: Simple example of Subroutine Up: Erroneous Code Previous: Erroneous Code

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996