mikibelavista
Technical User
- Jan 18, 2012
- 32
character*72 ifname,ofname
write(*, fmt="(/'Enter input file name')")
read(5,85) ifname
85 format(a72)
write(*, fmt="(/'Enter output file name')")
read(5,85) ofname
open(unit=11, file=ifname, form='unformatted', status='old')
open(unit=12, file=ofname)
n=0
100 read(11, end=999) x,y,z,t,u,i
write(12,5) x,y,z,t,u,i
5 format(5f10.3,i3)
n=n+1
go to 100
c
999 write(6,1) n
1 format(/'number of lines in file: ',i10/)
stop
end
I want to translate code above into FORTRAN 90 code.Ideas?
write(*, fmt="(/'Enter input file name')")
read(5,85) ifname
85 format(a72)
write(*, fmt="(/'Enter output file name')")
read(5,85) ofname
open(unit=11, file=ifname, form='unformatted', status='old')
open(unit=12, file=ofname)
n=0
100 read(11, end=999) x,y,z,t,u,i
write(12,5) x,y,z,t,u,i
5 format(5f10.3,i3)
n=n+1
go to 100
c
999 write(6,1) n
1 format(/'number of lines in file: ',i10/)
stop
end
I want to translate code above into FORTRAN 90 code.Ideas?