Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subroutines within the same module

Status
Not open for further replies.

mopen

Technical User
Jun 25, 2013
1
EG
Hi all,

I am working on a Fortran 90 program that has many subroutines within the same module. The question is "are all the variables of a called subroutine are available to the calling subroutine without declaring them in the argument list of the called surboutine"? even though they are within the same module.

for example
****************************************
Module x

contain
Subroutine h
*
*
Call subroutine m (m1,m2,m3)
*
end subroutine h

Subroutine m (m1,m2,m3)
*
*
*
F=*******
end subroutine m

end module x
************************************

so will "F" calculated in subroutine :m" will be available to subroutine "h" without declaring it in the argument list of subroutine "m"?

thanks
 
If you declare it at the beginning of the module and before the word "contains"...I think so...test it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top