When does a module go out of scope in Fortran 90/95?
问题 My intended use is program main use mod external sub call sub end program main subroutine sub ! code here calls subroutines in mod end subroutine sub Specifically, will module mod be in scope in subroutine sub ? Also, I'd be interested to know more generally when a module is in/out of scope. I'm using gfortran 4.6.1, if it matters. 回答1: It is not in scope of subroutine sub, as sub cannot call routines or use variables from mod, because sub is not part of the program main . They have nothing