CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

append data to a file

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 11, 2002, 18:00
Default append data to a file
  #1
Wen Long
Guest
 
Posts: n/a
Dear firends:

I got a problem with appending data to a existing file, how should I do with Fortran 77?

I'm using linux redhat 6.0, f77 as complier.

I wrote:

c-------------

open(1,file='test.txt',status='old',position='appe nd')

write(1,*)'this is appended data'

write(1,*)'this is again appended data' close(1)

end

c--------------

but it doesn't recognize 'append',

what's wrong?

Thanks for helping me out.

Wen
  Reply With Quote

Old   April 11, 2002, 20:45
Default Re: append data to a file
  #2
FYW
Guest
 
Posts: n/a
try this... and make sure you do not use a rewind statement otherwise it will go back to the start of the file and effectively cancel the append command.

open(1,file='test.txt',status='unknown', access='append')
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM 300 October 29, 2014 19:00
OpenFOAM 1.7.1 installation on LINUX UBUNTU 10.10 electrosin OpenFOAM Installation 39 July 1, 2014 07:55
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
gcc and executable file from Mac to Linux simone Marras Main CFD Forum 0 April 8, 2007 15:49
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


All times are GMT -4. The time now is 13:56.