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

Home » Public Forums » archive » Re: IDL procedure "knowing its own name"
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 procedure "knowing its own name" [message #26420 is a reply to message #26414] Wed, 29 August 2001 07:36 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Marshall Perrin wrote:
> Let's say I'm running somethingorother.pro. Is there any way for the procedure
> to itself determine that IDL is running a file called somethingorother.pro,
> indeed, specifically /some/file/path/somethingorother.pro?
>
> In more detail, what I've got is a script which processes a bunch of data
> and produces some output which gets stored in a user-specified directory.
> This script gets modified occasionally over time; it's useful to have a
> copy of the script stored along with the data as a historical record so
> that you can later look back and see exactly how the data was processed.
> However, this tool is used on a number of different systems, and the
> file path to the script varies from system to system. Right now I accomplish
> this by hard-coding the path and name of the procedure as variables inside
> the procedure, which means I have to change it by hand for each system.
> Any ideas on how to automate this?

It sounds like a version control problem. I concur with other members of
this group that CVS works very well for version control of IDL source
code. If you use CVS or any other tool that supports RCS tags, you can
simply embed an RCS tag (such as $Id$) in an IDL string variable:

rcs_id = '$Id: imdisp.pro,v 1.45 2000/08/28 16:17:14 gumley Exp $'

The procedure or function can then print or save the string variable to
a file when it is called, and CVS takes care of inserting the version
number, date, and owner of the last modification.

For more CVS information, see

http://cimss.ssec.wisc.edu/~gumley/

under the heading 'CVS'.

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Mysterious disappearing objects (bugs in IDLgrWindow::Draw)
Next Topic: IDL/Dataminer/mySQL is working!!

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

Current Time: Sun Oct 12 06:02:05 PDT 2025

Total time taken to generate the page: 1.68000 seconds