Re: restart a procedure by idl [message #7662] |
Tue, 17 December 1996 00:00 |
Robert Moss
Messages: 74 Registered: February 1996
|
Member |
|
|
R. Bauer wrote:
>
> Hello,
>
> I am using a program to write an other idl program.
> The new program should be started from the running one.
>
> when i do changes in then new program it should be started again from
> the first program. -- It didn't, it used always the first compiled one.
>
> how can I compile the new program again
>
> or
>
> how can I remove the compiled program from idl's memory
>
> --
> R.Bauer
>
> Institut fuer Stratosphaerische Chemie (ICG-1)
> Forschungszentrum Juelich
> email: R.Bauer@kfa-juelich.de
If you want to recompile the modified code on the fly, the
RESOLVE_ROUTINE procedure is what you are looking for. See the online
help for it.
--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
|
|
|
Re: restart a procedure by idl [message #7672 is a reply to message #7662] |
Fri, 13 December 1996 00:00  |
Phil Williams
Messages: 78 Registered: April 1996
|
Member |
|
|
Here's a little code snippet that I think does what you want.
;------------------------------------------
pro test
openw, 1, 'test2.pro'
printf,1, "pro test2"
printf, 1, "print, 'hello, world'"
printf, 1, "end"
close, 1
resolve_routine,'test2'
cmd = 'test2'
ok = execute(cmd)
openw, 1, 'test2.pro'
printf, 1, 'pro test2'
printf, 1, 'print, "Goodbye Cruel World"'
printf, 1, 'end'
close, 1
resolve_routine,'test2'
cmd = 'test2'
ok = execute(cmd)
end
;-----------------------------------------
Running returns the following:
IDL> .com test
% Compiled module: TEST.
IDL> test
% Compiled module: TEST2.
hello, world
% Compiled module: TEST2.
Goodbye Cruel World
IDL>
R. Bauer wrote:
>
> Hello,
>
> I am using a program to write an other idl program.
> The new program should be started from the running one.
>
> when i do changes in then new program it should be started again from
> the first program. -- It didn't, it used always the first compiled one.
>
> how can I compile the new program again
>
> or
>
> how can I remove the compiled program from idl's memory
>
> --
> R.Bauer
>
> Institut fuer Stratosphaerische Chemie (ICG-1)
> Forschungszentrum Juelich
> email: R.Bauer@kfa-juelich.de
--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
|
|
|