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

Why does my program stop writing after the first carriage return?

Status
Not open for further replies.

MigrantFirmWorker

Programmer
Apr 9, 2003
54
US
(Fortran 77, Windows 2000)
I am trying to write to a file:

open (2, FILE='outputfile')
write(2,*) 'stuff'
write(2,*) 'more stuff'
...
write(2,*) 'yet more stuff'

The first line writes correctly. The following lines do nothing and I get no error or warning.
I tried commenting out the first line. Then the second line writes, but none after.

Any suggestions?
 
try using a formatted output 100 format(1x,a) THe free form may be doing weird things .

What fortran Etc Etc
 
Check
Code:
STOP
statement. The program must close files via STOP.
 
Thanks for the suggestions. I finally had it compiled with a newer compiler and the problem went away.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top