Getting current MAIN procedure filename [message #9122] |
Tue, 03 June 1997 00:00  |
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  |
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
|
|
|