http://www.nationalfacility.apac.edu.au/training/FortranAdvanced/slides/slides.017.html
Common blocks are a Fortran 77 construct, providing areas of shared storage between different subroutines. eg.
the common storage is calledprogram main
integer :: a, b
real :: c
common /d/ a, b, c
...
end program main
subroutine foo()
integer :: a, b
real :: c
common /d/ a, b, c
...
end subroutine foo
d
and contains the integers a, b
and the real c
. Setting these variables in one routine changes it in all. Common blocks are now replaced by modules in Fortran 90.
No comments:
Post a Comment