next up previous contents
Next: Argument Intent Up: Program Units Previous: Argument Association

 

Local Objects

In the following procedure

    SUBROUTINE Madras(i,j)
     INTEGER, INTENT(IN) :: i, j
     REAL                :: a
     REAL, DIMENSION(i,j):: x

a, and x are known as local objects and x will probably have a different size and shape on each call.. They:

So, when a procedure is called, any local objects are bought into existence for the duration of the call. Thus if an object is assigned to on one call, the next time the program unit is invoked a totally different instance of that object is created with no knowledge of what happed during the last procedure call meaning that all values are lost.

The space usually comes from the programs stack.

Return to corresponding overview page gif


next up previous contents
Next: Argument Intent Up: Program Units Previous: Argument Association

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.