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

Home » Public Forums » archive » Re: Fast editing of text 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: Fast editing of text file? [message #44488 is a reply to message #44477] Wed, 15 June 2005 00:55 Go to previous messageGo to previous message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
As you describe it you always use the same file for your fortran
program.

Find out the file position of the 12th line (read or write it till
then,
then use GET_LUN)

When you open it again you use after opening POINT_LUN.
Then you write your 12th line (and all following lines - see below for
options).

You don't need to write the following lines, if your fortran program
can handle trailing (leading) spaces. In that case write the file the
first time with
the maximum possible line length.

Then use POINT_LUN and write a string (preceded) padded with as many '
' as
needed to fill up to the maximum line length.

Or if your fortran program cannot handle spaces format all numbers to
the maximum possible amount of digits.
(ie. write 1.100000 instead of 1.1, etc (use the FORMAT keyword to
write))

If this isn't possible either read the trailing strings once into a
string array and
write this out.
WRITE,lun,strarr

Cheers,
marc
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How does IDL find functions?
Next Topic: ASCII read problem

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

Current Time: Wed Oct 08 18:00:57 PDT 2025

Total time taken to generate the page: 0.00226 seconds