Re: Problem with RESOLVE_ROUTINE [message #75313] |
Fri, 25 February 2011 11:29 |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Friday, February 25, 2011 2:19:42 PM UTC-5, fgg wrote:
> That works! Thanks again, Wayne.
It does seem like this is a bug in RESOLVE_ROUTINE. The documentation is very specific in saying that "Routines are compiled even if they are already defined" and it even has a /NO_RECOMPILE keyword to change this default. But it looks like RESOLVE_ROUTINE only recompiles routines in the current directory. --Wayne
|
|
|
|
|
|
Re: Problem with RESOLVE_ROUTINE [message #75330 is a reply to message #75317] |
Fri, 25 February 2011 07:08  |
Jean[2]
Messages: 41 Registered: October 2010
|
Member |
|
|
On Feb 24, 2:17 pm, fgg <fabioguimaraesgoncal...@gmail.com> wrote:
> Hi,
>
> I'd like to compile a function from within a procedure, and I'm using RESOLVE_ROUTINE for that:
>
> pro test_pro
> resolve_routine, 'test_func', /is_function
> print, test_func(2)
> end
>
> However, this doesn't seem to be working... if I (1) open the function file (see below), (2) change the return statement to x^3, (3) close it without compiling it, and (4) run the procedure above again, it will continue to print "4".
>
> function test_func, x
> return, x^2
> end
>
> I have no problems if I enter ".COMPILE test_func" at the command line. Any ideas?
>
> Thank you
I faced this issue several times before I started to have the reflex
to always do a full reset before compiling
> .reset
Jean
|
|
|