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

append data to a file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] OpenFOAM 1.7.1 installation on LINUX UBUNTU 10.10 electrosin OpenFOAM Installation 40 May 31, 2016 05:11
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11: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 22:00


All times are GMT -4. The time now is 08:44.