Externally declared (global) variable in Fortran
问题 I want to know if it's possible to declare a variable and have declaration carry over to another subroutine or program (hence become global) For example program main implicit none call mysub print *, x end program main subroutine mysub implicit none integer, parameter :: x = 1 end subroutine mysub Would print "1" Is this possible? I want to do this because a program I'm working on has large sets of variables that I would rather avoid copying unless necessary. 回答1: The most straightforward way