Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading binary file!!

Status
Not open for further replies.

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?

 
mikibelavista said:
I want to translate code above into FORTRAN 90 code.Ideas?
And what is the problem ?
If you delete this
Code:
go to 100
[highlight]c[/highlight]
999 write(6,1) n
then it compiles. Other thing is if it will work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top