| 
 | 
 
程序结构如下: 
 
program Fcode 
 
 implicit real*8 (A-H,O-Z) 
 implicit integer*4(I-M) 
 
  …… 
 include 'main.com' 
 …… 
(程序部分) 
end 
 
在相同路径下有main.com的一个文本格式的文件,内容如下 
 common /ustar/ use(ndn), usc2(ndn,ndl), us2(ndn), iss(ndn), jss(ndn,ndl) 
 
 
现在问题来了: 
1.common里面的数组其类别遵从于 上面的implicit real*8 (A-H,O-Z)和implicit integer*4(I-M)吗? 
比如说use 是real*8类别的吗? 
2.用common开辟的某个有名字的公共区,里面的数组其类型有必要相同吗? 
比如说 iss和 jss这两个数组的类型是整型还是实型? 
 
 
还有关于module的一个问题。 
我用module定义了几个数组如下 
module Mtr 
implicit none 
real*8,allocatable:: a(:) 
…… 
end module Mtr 
 
和一个allocate的子函数 
subroutine alloca 
implicit none 
allocate(a(8)) 
end subroutine alloca 
 
子程序如下: 
subroutine xxx 
  use Mtr 
 …… 
end subroutine 
 
 
subroutine yyy 
  use Mtr 
 …… 
end subroutine 
 
 
在主程序中有: 
 
protram main 
  use Mtr 
  implicit none 
  call alloca 
  call xxx   
  call yyy 
  …… 
 end  
 
 请问在这种情况下,xxx中的数组a和yyy中的数组a是一致的么? 
 
还有就是:有没有查询数组或者变量类别的函数? 
 
求各位指点迷津。 
 
 
 
 
 
 
 |   
 
 
 
 |