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

Home » Public Forums » archive » IDL Error GCPC data
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: IDL Error GCPC data [message #69344 is a reply to message #69259] Mon, 04 January 2010 18:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sampton writes:

> Thanks again for your help,
> I'm just wondering how I can save struct to data.txt after executing
> the command under IDL:
> IDL> read_v2_1, 'gpcp_v2.1_psg.1979', struct
> I want to save struct to data.txt to be oppened with text editor under
> windows (so data.txt wil be located under a spedcific folder say: c:
> \cgcp\data.txt).

I'd try something like this:

fields = Tag_Names(struct)
OpenW, lun, 'C:\cgcp\data.txt', /Get_Lun
FOR j=0,N_Elements(fields)-1 DO $
PrintF, lun, fields[j], ': ', struct.[j]
Free_Lun, lun

Cheers,

David




--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ITT VIS at the 90th AMS Annual Meeting
Next Topic: Mosaic_doit in IDL gives a different result that the ENVI mosaic tool

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

Current Time: Fri Oct 10 06:10:37 PDT 2025

Total time taken to generate the page: 1.20064 seconds