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

Home » Public Forums » archive » Re: append to the first line of a 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: append to the first line of a text file.... [message #74435 is a reply to message #74433] Fri, 14 January 2011 11:01 Go to previous messageGo to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On Jan 14, 10:34 am, David Fanning <n...@dfanning.com> wrote:
> George Millward writes:
>> I am wanting to 'append' an ascii file - but instead of appending the
>> new data to the bottom
>> I want the new data to be at the top of the file.
>
>> Does anyone have any suggestions ?
>
> Have you tried positioning the file pointer to the
> beginning of the file with POINT_LUN? Worth a try,
> I guess. You may have to include your own carriage
> return.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

David,

Yes, tried that - it just overwrites the first line - same as doing
openu and printf without /append

ie,

openu, /append
point_lun, 0
printf

is the same as:

openu
printf

At least I think so.

I guess I'm just going to have to write a routine to do what I want
...something like reading all the current data into a buffer - write
the new data - then append the buffer onto the new data.
...shouldn't be too hard - I was just wondering if there was a
keyword.

Thanks anyway.

George.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: instructor solution manual for Analytical Chemistry, Higson
Next Topic: Re: How to speed up or remove this FOR loop

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

Current Time: Sat Oct 11 18:00:57 PDT 2025

Total time taken to generate the page: 3.75905 seconds