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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to send output to a file

Status
Not open for further replies.

Zemm

Technical User
Apr 22, 2006
6
US
I am using fortran in DOS in Windows 98. Is there fortran code that will send the program's output to a text file?
 
Several ways

1) You could open a file in fortran using the open statement. Eg if you're writing to channel 6.
Code:
open (6, file='filename', status='new')
...
close (6)

2) if the program is called xxx.exe, from a command prompt
Code:
xxx > xxx.txt
Use this one if you are using print statements.
 
#2 is exactly what I was after. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top