Re: [問題] 有關fortran寫法

看板Programming作者時間18年前 (2007/12/11 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/6 (看更多)
※ 引述《=?big5?B?5qPmow==?= <devil@tainan.com.tw.x>, 看板: Language》之銘言: : 你的程式碼貼出來才知道要改哪。 : ==> 本文由 "挑戰人生 <chuee.bbs@binary.csie.ncu.edu.tw>" : > 於 news:4XQDbZ%24a8Q%40binary.csie.ncu.edu.tw 發表 : > 意思是當我抓到2005072117時的資料 03.後 ,程式接著去抓05. 05. 04. 04. 05.資料 : > 目前我是卡在當我抓到2005072117 的資料03.後,程式無法去抓05. 05. 04. 04. 05. : > 資料,只會一直抓到03.資料,我想說就是時間隨時都會變,不一定都是抓17時資料, character ctime*12,tt*2,ati*10 open(5,file='rot.dat',status='old') read(ctime(9:10),'(i2)')itime if(itime.ge.3.and.itime.lt.9)then itime=6 elseif(itime.ge.9.and.itime.lt.15)then itime=12 elseif(itime.ge.15)then itime=18 else itime=0 endif write(tt,'(i2)')itime if(itime.lt.10)tt='0'//tt(2:2) ctime=ctime(1:8)//tt do i=1,1000 read(5,31,end=335)ati,ro,noknow if(ctime(1:10).eq.ati)then rota=ro print *,ati,ro return endif 31 format(a10,1x,f3.0,i5) enddo 335 continue print *,' ERROR HAPPEN !' stop end 例如ctime=ati=2005072117 資料會依序讀出 03. 05. 05. 04. 04. 05.資料 但是一個時間只有一個值 現在我只要我抓到指定時間的資料後,接著抓之後幾小時的rota資料,不用再去抓時間 麻煩大家給我ㄧ些方向或解法,謝謝 -- 〒作者:chuee 來自:98-221.dorm.ncu.edu.tw ◎二進位的世界【140.115.50.50‧bbs.ncu.cc】
文章代碼(AID): #17NNxZ00 (Programming)
文章代碼(AID): #17NNxZ00 (Programming)