convert character to integer

convert character to integer

i already know how to convert character data to integer data and i found this myself.

character*12 Date
dimension stn(15,2)
open (1, file="/home/rf.csv")
read(1,*)
read(1,*)
do 10 k=1,360
read (1,*) date,((stn(i,j),j=1,2),i=1,10)
read(unit=Date,fmt=500) idy,imth,iyr
iymd=iyr*10000+imth*100+idy
print*, idy,imth,iyr,iymd
10 continue

500 format (i2,1x,i2,1x,i4)
end

when i run this program in the terminal i got something like the following:

31 12 2008 20081231
2 1 2009 20090102
. . . .
. . . .

now i have another new task to do.

NAY
1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.