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

Simple writing to a file...

Status
Not open for further replies.

jkepler

Programmer
Nov 21, 2007
3
0
0
PT
Hi,

I'm trying to output to a file - in fortran 77 - some variables I'm reading from a file (numbers, text, etc...)

I'm opening the file as:

OPEN ( UNIT = 14,
. FILE = 'INFO.txt',
. STATUS = 'UNKNOWN' )

I'm trying to output some values like:

READ (*,'(6X,I6)') VAR1
WRITE (14,100) VAR1

But it's not working...

What am I doing wrong?...

Sorry for the incovinience.

Regards,

JKepler
 
I would not use any format during the READing process unless it is absolutely necessary; column oriented reading is mostly trouble and rigid. See if you can simply go the list-oriented route: "READ(*,*)...".

As far as the WRITE goes, you do not show what format labeled "100" looks like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top