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

Home » Public Forums » archive » Re: 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 #69252 is a reply to message #69251] Thu, 24 December 2009 09:38 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sampton writes:

> What I use is:
> - Type "idl" at the UNIX command prompt to start IDL.
> - Type: .run read_v2_1_file.pro to compile the procedures.
> - Type: read_V2_1, "Bin_DATA_FILE_NAME", "STRUC"
> and I changed the file names inside the pro file accordingly. At the
> end no output file is generated, I'm expecting to read a binary file
> but no file is generated.
> Did I miss something ?

Quite a lot, actually. :-)

You won't have to do step 2, with the .RUN if you
move the read_V2_1 module to the bottom of the file and
name the file "read_v2_1.pro".

http://www.dfanning.com/tips/namefiles.html

If you do include this step, .COMPILE would be a better choice,
unless you always want to always see that printed help
message, which I think contains inaccurate information.

Then, on this command:

IDL> read_V2_1, "Bin_DATA_FILE_NAME", "STRUC"

Is that *really* the name of the file you want to open? That
is an *extremely* weird name. Normally, on LINUX systems filenames
will have all lowercase letters, unless there is some extraordinary
reason for not doing so.

In any case, you want "struct" to be a variable, not a string,
so you don't want to put quotes around it. If that filename
is a valid one, you probably want to call your program like this:

IDL> read_V2_1, "Bin_DATA_FILE_NAME", struct

This will pass the (undefined?) variable struct into the program
in a pass-by-reference (rather than pass-by-value) way. When the
program works, you *should* have struct defined as something that
got read out of the file. Is that was you intend?

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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fitting contours with ellipse
Next Topic: Re: Reducing a set of curves to a mean curve

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

Current Time: Fri Oct 10 01:43:06 PDT 2025

Total time taken to generate the page: 0.79440 seconds