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 #78959 is a reply to message #78958] Thu, 19 January 2012 04:18 Go to previous messageGo to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
I haven't done this, but POINT_LUN may do what you want. You'd need
to know the number of bytes per line. You will still have to read the
entire line, change the bit you want to change, move the LUN back to
the beginning of the line, and rewrite it.

OpenR, LUN, filename, /Get_Lun
Point_Lun, LUN, line_number * bytes_per_line
tmp=''
ReadF, LUN, tmp
; change the line as you see fit
new_line = tmp + 'changed line!'
Point_Lun, LUN, line_number * bytes_per_line
PrintF, LUN, new_line
Free_Lun, LUN

Code is UNTESTED!
[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: Fri Oct 10 13:26:29 PDT 2025

Total time taken to generate the page: 0.64258 seconds