- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page