ast*_*y13 3 fortran module fortran90 formats fortran95
我有一个带有许多子程序的模块,它们都使用相同的格式来输出.现在,我必须在每个子程序中声明格式.有没有办法在模块中声明它们,以便所有子程序都可以访问它们?
jan*_*neb 7
您可以将格式存储为模块级别的字符.例如
module foo implicit none character(len=20), parameter :: form = "(1X,A)" contains subroutine bar ... write(my_unit, form) "Hello, World" end subroutine bar end module foo
归档时间:
14 年,3 月 前
查看次数:
612 次
最近记录: