Fortran arrays and subroutines

Posted by ccook on Stack Overflow See other posts from Stack Overflow or by ccook
Published on 2010-03-22T18:37:59Z Indexed on 2010/03/22 18:41 UTC
Read the original article Hit count: 728

Filed under:
|
|

I'm going through a Fortran code, and one bit has me a little puzzled.

There is a subroutine, say

SUBROUTINE SSUB(X,...)
REAL*8 X(0:N1,1:N2,0:N3-1),...
...
RETURN 
END

Which is called in another subroutine by:

CALL SSUB(W(0,1,0,1),...)

where W is a 'working array'. It appears that a specific value from W is passed to the X, however, X is dimensioned as an array. What's going on?

© Stack Overflow or respective owner

Related posts about fortran

Related posts about subroutine