program zhanming
type station
character name*10,year*11,time*11,id*8,pre*8,te*6,rain*8,tem*8
endtype
type(station),dimension(311) :: sta
Open(23,file='72.txt',status='old')
Open(22,file='72-reads-out.txt')
do i=1,1
read(23,*)
end do
do i=1,311
read(23,*) sta(i).name,sta(i).year,sta(i).time,sta(i).id,sta(i).pre,sta(i).te,sta(i).rain,sta(i).tem
print *, sta(i).name,sta(i).year,sta(i).time,sta(i).id,sta(i).pre,sta(i).te,sta(i).rain,sta(i).tem
write(22,*) sta(i).name,sta(i).year,sta(i).time,sta(i).id,sta(i).pre,sta(i).te,sta(i).rain,sta(i).tem
enddo
close(22)
close(23)
end
子长 2017-01-01 00:00:00 53748 901.3 -8.4 999999 79
志丹 2017-01-01 00:00:00 53832 884 -9.3 999999 82
安塞 2017-01-01 00:00:00 53841 900.8 -8.6 999999 80
延安 2017-01-01 00:00:00 53845 887.8 -7.3 0 86
甘泉 2017-01-01 00:00:00 53848 907.9 -8.4 999999 84