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

Home » Public Forums » archive » Re: Reading and saving 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: Reading and saving a file [message #74611] Thu, 27 January 2011 07:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paolo writes:

> Basically you want to use openw to get a file unit:
>
> openw, Unit, 'data.dat', /GET_LUN
>
> then printf to write the contents
>
> mydata=[1,2,3]
>
> printf,unit,mydata
>
> close,unit

Well, use FREE_LUN, instead of CLOSE. CLOSE won't
free the logical unit number to be used over again
when it is obtained this way. FREE_LUN will both
close the file *and* free the logical unit number.

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: configuration file to go along with a virtual machine program
Next Topic: MATRIX LOGARITHM (and EXPONENTIAL)

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

Current Time: Wed Oct 08 15:42:07 PDT 2025

Total time taken to generate the page: 0.00473 seconds