0

Simply Fortran コンパイラを使用していますが、コンパイルしようとすると次のエラーが発生します。

prog.f95:35.13:
1 暗黙的なし

prog.f95:53.65:
2 開いています (ユニット = 1、ファイル = 'in'、ステータス = 'OLD') ! パラメータ付きのファイルを開く

エラー: (1) と (2) の 2 つのメイン プログラム

全体が非常に長いため、エラーが発生するコードの部分のみを含めました。これは、プログラムの最初から始まります。もっと含める必要があるかどうか教えてください。

Implicit None
Integer :: i,j,iter
real(8) :: Elow,Ehigh,chi,B_NS,Vbrprof,Neprof,taues
real(8) :: Xcyclave,a

character(8) systemdate
character(10) systemtime
character(5) timezone
integer dateandtime(8)

character(8) systemdate2
character(10) systemtime2
character(5) timezone2
integer dateandtime2(8)

character(len=40) ::  infname,outfname,comm
include 'common.f95'

open (unit=1,file='in',status='OLD')    ! opens file with parameters

read (1,1)                              ! comment line
read (1,1) outfname
read (1,*) Elow,Ehigh                   ! lower and higher energy
read (1,*) Eminf,Emind,Emaxf            ! min and max energy for fedd
read (1,*) Rin, Rout                    ! inner and outer radii
read (1,*) profpar(1)                   ! for Ne
read (1,*) profpar(2)                   ! Te in keV
read (1,*) profpar(3)                   ! for absorption+emission
read (1,*) profpar(4)                   ! T_bb for neutron star in keV
read (1,*) profpar(5)                   ! for bulk velocity
read (1,*) profpar(6)                   ! other parameter for model
read (1,*) profpar(10)                  ! magnetic moment in 10^27 CGS
1 format (A10)
close (1)
4

1 に答える 1

1

コンパイラは、ファイル common.f95 内の END xxx ステートメントを認識している可能性があります。ファイル common.f95 は、INCLUDE ファイルとして使用するためのものではない可能性があります。それ自体がプログラム単位である可能性があります。

于 2012-12-04T22:59:19.490 に答える