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

Home » Public Forums » archive » Getting current MAIN procedure filename
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
Getting current MAIN procedure filename [message #9122] Tue, 03 June 1997 00:00 Go to next message
Paul R Smith is currently offline  Paul R Smith
Messages: 8
Registered: January 1996
Junior Member
Hi,
Is there a way to get the name of the current PRO filename that has been
compiled as $MAIN$ ? I can see it when doing HELP,/SOURCE but can get this
info into a variable. My plan was to assign the help output to a variable
and search for $MAIN$ and get the filename from that line. It's useful
when doing plots to stamp each with the date and filename that generated
it. Thanks,
Paul
Re: Getting current MAIN procedure filename [message #9245 is a reply to message #9122] Wed, 04 June 1997 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
P. Smith wrote:
>
> Hi,
> Is there a way to get the name of the current PRO filename that has been
> compiled as $MAIN$ ? I can see it when doing HELP,/SOURCE but can get this
> info into a variable. My plan was to assign the help output to a variable
> and search for $MAIN$ and get the filename from that line. It's useful
> when doing plots to stamp each with the date and filename that generated
> it. Thanks,
> Paul

--

Yes it is
look at my example.

========================
print,'hello'

whoami,dir,name
print,dir,name


end
=========================

output:


.ru test
% Compiled module: $MAIN$.
hello
% Compiled module: WHOAMI.
% Compiled module: GETWRD.
% Compiled module: FILEBREAK.
% Compiled module: REVERSE.
test.pro

========================================


whoami.pro belongs to Ray Sterner.

http://fermi.jhuapl.edu/res/



An other useful routine will be whocalledme.



R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: continuous update of plot
Next Topic: No CR Events in Table Widgets in IDL 5.0

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

Current Time: Wed Oct 08 13:39:37 PDT 2025

Total time taken to generate the page: 0.00380 seconds