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

Home » Public Forums » archive » Re: Save file creation rules of the road
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
Re: Save file creation rules of the road [message #69825] Thu, 18 February 2010 05:23 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rob writes:

> I'm trying to create a distributable IDL save file via IDLDE > Project
>> "Build Project". A save file was created without error -- some
> initial complaints were issued, then automatically resolved. I then
> restored this save file in a new IDL cli session. All expected
> functions and procedures were listed, via "restore, /verbose" and
> "help"; see below. However, an attempt to run one of the restored
> procedures yielded the annoying "Variable is undefined:
> SPIDR_ASCII_GET_META.... EXCEPTION..." I've experienced this before
> and the hack I employed wasn't pretty. It involved compiling
> (via .compile) all functions and procedures I thought I needed and
> creating a save file somewhat manually, then a sacrificial lamb and a
> kabuki dance. Thus, I suppose I've never really learned how to create
> a proper save file with just the functionality I need. Can someone
> point me in the right direction?

I had something like this happen to me just the other day,
too. In my case, I had two functions and the second was being
called inside the first to provide a parameter for the first.
Both the functions were named correctly in their respective
files, and both resided in the coyote directory, which is
ALWAYS on my IDL path.

But every time I would run this program after starting up
IDL, it would barf on the same line. Said it couldn't find
that second embedded function! I don't think I had ever
seen this happen before in IDL.

In any case, I inserted a STRICTARR compile option into
that program module, and the problem went away. I wonder
if something changed in the way IDL resolves functions?

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.")
Re: Save file creation rules of the road [message #69966 is a reply to message #69825] Fri, 19 February 2010 21:12 Go to previous message
Robert Moss, PhD is currently offline  Robert Moss, PhD
Messages: 29
Registered: November 2006
Junior Member
On Feb 18, 8:23 am, David Fanning <n...@dfanning.com> wrote:
> Rob writes:
>> I'm trying to create a distributable IDL save file via IDLDE > Project
>>> "Build Project". A save file was created without error -- some
>> initial complaints were issued, then automatically resolved.  I then
>> restored this save file in a new IDL cli session. All expected
>> functions and procedures were listed, via "restore, /verbose" and
>> "help"; see below. However, an attempt to run one of the restored
>> procedures yielded the annoying "Variable is undefined:
>> SPIDR_ASCII_GET_META.... EXCEPTION..." I've experienced this before
>> and the hack I employed wasn't pretty.  It involved compiling
>> (via .compile) all functions and procedures I thought I needed and
>> creating a save file somewhat manually, then a sacrificial lamb and a
>> kabuki dance.  Thus, I suppose I've never really learned how to create
>> a proper save file with just the functionality I need. Can someone
>> point me in the right direction?
>
> I had something like this happen to me just the other day,
> too. In my case, I had two functions and the second was being
> called inside the first to provide a parameter for the first.
> Both the functions were named correctly in their respective
> files, and both resided in the coyote directory, which is
> ALWAYS on my IDL path.
>
> But every time I would run this program after starting up
> IDL, it would barf on the same line. Said it couldn't find
> that second embedded function! I don't think I had ever
> seen this happen before in IDL.
>
> In any case, I inserted a STRICTARR compile option into
> that program module, and the problem went away. I wonder
> if something changed in the way IDL resolves functions?
>
> 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.")

It might be a compile order issue. I use COMPILE_OPT IDL2 in nearly
everything (which includes STRICTARR as David mentioned), so it is
rarely a problem for me, but if this is not for you try compiling the
second embedded function before the first when creating your save
file. That will usually fix it.

r
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Writing compressed HDF5 files with IDL
Next Topic: easy switch to 32 bit?

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

Current Time: Wed Oct 08 17:35:39 PDT 2025

Total time taken to generate the page: 0.00604 seconds