[Fortran] subroutines within the same module

  • Context: Fortran 
  • Thread starter Thread starter mopen
  • Start date Start date
  • Tags Tags
    Fortran module
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
mopen
Messages
2
Reaction score
0
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

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
 
Physics news on Phys.org
Do you know what is a scope of the variable? (Google if not)
 
Borek said:
Do you know what is a scope of the variable? (Google if not)

Be Nice to people!