2012-12-04 25 views
0

我使用的是簡單的Fortran編譯,當我嘗試編譯我的錯誤:錯誤:在兩個主要方案(1)和(2)

prog.f95:35.13:
1隱無

prog.f95:53.65:
2 open(unit = 1,file ='in',status ='OLD')!將打開參數

文件

錯誤:在兩個主要方案(1)和(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) 

回答

1

編譯器可能在文件common.f95中看到END xxx語句。 common.f95文件可能不是用來作爲INCLUDE文件的 - 它可能是一個單獨的程序單元。

+0

這樣做了,謝謝! – whatsherface

相關問題