Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[Fortran] subroutines within the same module

  1. Jun 25, 2013 #1
    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)
    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"?

  2. jcsd
  3. Jun 25, 2013 #2


    User Avatar

    Staff: Mentor

    Do you know what is a scope of the variable? (Google if not)
  4. Jun 25, 2013 #3
    Be Nice to people!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook