- 积分
- 16
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-2-21
- 最后登录
- 1970-1-1
|
发表于 2018-7-25 10:55:25
|
显示全部楼层
- program main
- implicit none
- Integer , parameter :: N = 1497
- character(len=12000):: title
- Integer :: sites(N),date,hr,k,i
- character(len=9) :: ty
- open(10,file="china_sites_20150102.csv") !
- open(11,file="china_sites_20150102_out.csv") !
- read(10,"(a10000)") title
- write(11,"(a)")trim(title)
- do
- sites=0
- read(10,*,ioStat=k) date,hr,ty,sites
- if(k/=0) exit
- write(11,101) date,',',hr,',',ty,(',',sites(i),i=1,N)
- enddo
- close(10)
- close(11)
- 101 format(I8,A,I4,A,A9,*(A,g0))
- end program main
|
|