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

Home » Public Forums » archive » Write to file help...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Write to file help... [message #92578] Sun, 17 January 2016 11:55 Go to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Folks,
Hi,
I am running an IDL code like this
......
print, x
print, y
print, z
print, t

openw, lun, 'test.txt', /get_lun
printf, lun,x,y,z,t
free_lun, lun
........
x,y,z, t are float numbers.
What i want is like this:
1- first run: make a file like 'test.txt'and write the result to this file ('test.txt').
2- at the second run (and more), append the new x,y,z, t to the 'test.txt' file.
At the end, i need a text file that holds all of my data in single 'test.txt'...
Thanks for any kind of help in advance :)
Cheers,
Dave
Re: Write to file help... [message #92579 is a reply to message #92578] Sun, 17 January 2016 16:27 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Sunday, January 17, 2016 at 12:55:35 PM UTC-7, dave poreh wrote:
> Folks,
> Hi,
> I am running an IDL code like this
> ......
> print, x
> print, y
> print, z
> print, t
>
> openw, lun, 'test.txt', /get_lun
> printf, lun,x,y,z,t
> free_lun, lun
> ........
> x,y,z, t are float numbers.
> What i want is like this:
> 1- first run: make a file like 'test.txt'and write the result to this file ('test.txt').
> 2- at the second run (and more), append the new x,y,z, t to the 'test.txt' file.
> At the end, i need a text file that holds all of my data in single 'test.txt'...
> Thanks for any kind of help in advance :)
> Cheers,
> Dave

openw, lun, 'test.txt', /get_lun, /append

Jim P.
Re: Write to file help... [message #92580 is a reply to message #92579] Mon, 18 January 2016 02:59 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Monday, January 18, 2016 at 1:27:50 AM UTC+1, Jim P wrote:
> On Sunday, January 17, 2016 at 12:55:35 PM UTC-7, dave poreh wrote:
>> Folks,
>> Hi,
>> I am running an IDL code like this
>> ......
>> print, x
>> print, y
>> print, z
>> print, t
>>
>> openw, lun, 'test.txt', /get_lun
>> printf, lun,x,y,z,t
>> free_lun, lun
>> ........
>> x,y,z, t are float numbers.
>> What i want is like this:
>> 1- first run: make a file like 'test.txt'and write the result to this file ('test.txt').
>> 2- at the second run (and more), append the new x,y,z, t to the 'test.txt' file.
>> At the end, i need a text file that holds all of my data in single 'test.txt'...
>> Thanks for any kind of help in advance :)
>> Cheers,
>> Dave
>
> openw, lun, 'test.txt', /get_lun, /append
>
> Jim P.

Thanks Jim P :)
It works like a charm :)
Cheers,
Dave
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Help Annoyance
Next Topic: i cann't open idl because idlde.exe has stopped working.

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

Current Time: Wed Oct 08 15:56:30 PDT 2025

Total time taken to generate the page: 0.00557 seconds