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

Home » Public Forums » archive » Re: Save IDL Procedure 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: Save IDL Procedure Name [message #31949] Thu, 29 August 2002 09:15 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
wen wrote:
> Hi,
>
> Does anyone know if there is a way to save an IDL procedure name as a
> variable? I would like to be able to use this name within my
> procedure.
>
> thanks,
> wen

Yes,

did you tried

help,call=call

in your routine

PRO test

HELP,call=call
PRINT,call

file=within_brackets(call[0],brackets=['<','('])
PRINT,file

fpe=file_path_name_ext(file)
PRINT,fpe.name

END


The result is for example

TEST </private/20020829/test.pro( 3)> $MAIN$

Now you can separate this by whithin_brackets
result is /private/20020829/test.pro

The separation of path, routine and extension is done by file_path_name_ext.

PRINT,fpe.name shows "test"


You need the following routines from our library:

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/within_brackets.tar.gz
or
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/within_brackets.sav

and

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/file_path_name_ext.tar.gz
or
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/file_path_name_ext.sav


(Remember a idl compiled file with the extension sav is automaticly
loaded the first time it is used.
This is the same behaviour as for idl sources (.pro).
They run on each idl platform with the same idl version (5.5))


For further routines and licensing please have a look at
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html



Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[Message index]
 
Read Message
Read Message
Previous Topic: Save IDL Procedure Name
Next Topic: changing graph colors in Win2k IDL 5.4

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

Current Time: Sat Oct 11 14:41:15 PDT 2025

Total time taken to generate the page: 1.67998 seconds