這裏是我的Fortran代碼的一部分之後編譯給我一個錯誤說「ICOUNT在(1)不是一個變量「ICOUNT」在(1)不是一個變量
在這裏不用我的代碼:
integer*4 iy1
integer*2 id1,im1
parameter (month=12,maxper=5,specmax=8)
real conc(month,8,icount(8,month))
integer smonth(12),icount(8,month)
real per(maxper),rper(maxper)
data smonth/12,1,2,3,4,5,6,7,8,9,10,11/
data per/0.10,0.25,0.5,0.75,0.90/
open(unit=1`,file='data_co.txt',status='old')
open(unit=2,file='chennai_alldatatop10.txt',status='unknown',iostat=ierr)
if(ierr.eq.0)close(2,status='delete')
open(unit=2, file='chennai_alldatatop10.txt',status='unknown')
inum=0
2 read(2,*,end=3)id1,im1,iy1,conc1
icount(1,im1)=inum+1
conc(im1,1,icount(1,im1))=conc1
goto 2
3 continue
end
我已經很多年沒有寫Fortran語言,但我不是因爲你使用它的任何地方定義的變量'icount'。這可能是問題嗎? –
它已經在頂部的聲明部分定義了 – Nick