comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Write to a certain line of a file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Write to a certain line of a file [message #78963 is a reply to message #78962] Wed, 18 January 2012 12:05 Go to previous messageGo to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
If the file is an ascii file you can read the file, modify the content
and then rewrite everything.

content=STRARR(FILE_LINES(file))

OPENR, lun, file, /GET_LUN
READU, lun, content
FREE_LUN, lun

;; then u modify the content
content[i]='new content'

;; rewrite everything
OPENW, lun, file, /GET_LUN
PRINTF, lun, content
FRRE_LUN, lun

Cheers,
nara
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: confidence level
Next Topic: Write to a certain line of a file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 08:35:12 PST 2025

Total time taken to generate the page: 0.72112 seconds