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

Home » Public Forums » archive » Lost Functions
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: Lost Functions [message #10264 is a reply to message #10226] Tue, 04 November 1997 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
David Fanning wrote:
>
> [This followup was also posted to comp.lang.idl-pvwave]
>
> Matthew Hanson (matt@ktaadn.com) writes:
>
[cut]
> Most of the time this kind of problem is resolved by having
> your programs be compiled automatically when they are needed.
> In other words, give your program files the same name as the
> procedure or function and let IDL find them when it needs them.

let me just add a little note on seperate files vs. "libraries", because
I don't think this is mentioned in the IDL manuals:
It seems as if the automatic compilation of IDL always compiles up to
the
point where it finds the procedure or function with the same name as the
filename. Hence, if you have some functions that are closely related,
and
you don't want them all in seperate files, you have to make sure that
you
call the last one first - or that all your *sub*routines precede your
*main*pro(cedure/gram). I use this for a usage mechanism, so instead of
writing out the usage lines within my procedure, I define a
use_<procname>
procedure and this is called when an error is detected in the parameters
passed.

Also, in this respect, it may be of interest to note that IDL is not
completely
case-insensitive when trying to match a filename with a procedure name.
I once
tried a procedure name test_3D.pro, and IDL did not like it, although
the procedure
is named completely identical. Here is what I got:

% Attempt to call undefined procedure/function: 'TEST_3D'.
% Execution halted at: $MAIN$

Regards,
Martin

------------------------------------------------------------ -------------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-9837
Please indicate name and room (186 Pierce) when sending a fax

e-mail: mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: A rant: features vs. programming features
Next Topic: IDL Programming Techniques Course Full

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

Current Time: Sun Oct 12 09:20:13 PDT 2025

Total time taken to generate the page: 1.67956 seconds