Re: calling a user-named procedure [message #7773] |
Wed, 15 January 1997 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
eddie haskell wrote:
>
> hi,
> i would like to be able to call a procedure whose name is given by the user during execution. example:
>
> pro stuff,filename
> ...
> call/execute, filename ;this is the line i cannot figure out
> ...
>
> where filename is a string holding the name of a procedure (.pro file) input by the user e.g. from
>
> pro junk
> ...
> print,'input filename'
> read,filename
> stuff,filename ;call procedure stuff with filename as the argument
> ...
>
> i have tried different syntaxes of execute and call_procedure but to no avail.
> either i am just not phrasing things correctly, or i am on the wrong track.
> does anyone know if this can be done, and if so, how?
>
> thanks,
> eddie
> ------------------------------------------------------------ ----------
> When you are a Bear of Very Little Brain, and you Think of Things, you
> find sometimes that a Thing which seemed very Thingish inside you is
> quite different when it gets out into the open and has other people
> looking at it.
>
> - A.A. Milne, "The House At Pooh Corner"
RESOLVE_ROUTINE
The RESOLVE_ROUTINE procedure compiles user-written or library
procedures or functions, given their names. Routines are compiled even
if they are already defined. This procedure is similar to the .COMPILE
executive command, but can be invoked within procedures and functions.
Calling Sequence
RESOLVE_ROUTINE, Name
Arguments
Name
A scalar string or string array containing the name or names of the
procedures to compile. If Name contains functions rather than
procedures, set the IS_FUNCTION keyword.
Keywords
IS_FUNCTION
Set this keyword to compile functions rather than procedures.
See Also
RESOLVE_ALL, .COMPILE in "Executive Commands" on page 2-10 of the IDL
User's Guide.
============================================================ =========
resolve_routine,filename
a=execute(filename)
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@kfa-juelich.de
|
|
|