COMMON block COMMON block COMMON block是Fortran中在不同函数之间传递变量的第二种方法(第一种是通过函数的输入参数)(但是我很讨厌这种方法)。它通过在不同函数中定义跟随在COMMON后的变量来传输。比如说在主程序中有 1 2 3 4 5 COMMON A, B, C A = -2 B = 0.9 C = 66 然后在子程序中有 1 COMMON C, B, D 则子程序中C为-2、B为0.9、D为66。注意这和变量名无关,只和顺序有关。 参考 Previous NLTE下的辐射转移和大气模型 Next Working from home: remote jupyter notebok set up CATALOG COMMON block FEATURED TAGS random learning hanging-around astro-ph experience FRIENDS Gerry Fmajor's Blog Hux Blog