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

Home » Public Forums » archive » Re: Problem with RESOLVE_ROUTINE
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
Re: Problem with RESOLVE_ROUTINE [message #75313] Fri, 25 February 2011 11:29
wlandsman is currently offline  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 #75314 is a reply to message #75313] Fri, 25 February 2011 11:19 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
That works! Thanks again, Wayne.
Re: Problem with RESOLVE_ROUTINE [message #75316 is a reply to message #75314] Fri, 25 February 2011 10:31 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Friday, February 25, 2011 1:12:31 PM UTC-5, fgg wrote:
> But that can't be used in programs, right?

You might try using Craig Markwardt's FILE_COMPILE
http://www.physics.wisc.edu/~craigm/idl/down/file_compile.pr o
supplying it with the full path to the file.

This is a wrapper around RESOLVE_ROUTINE that first changes the current directory to be in the directory where the file is located (and then changes back).

--Wayne
Re: Problem with RESOLVE_ROUTINE [message #75317 is a reply to message #75316] Fri, 25 February 2011 10:12 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
But that can't be used in programs, right?
Re: Problem with RESOLVE_ROUTINE [message #75330 is a reply to message #75317] Fri, 25 February 2011 07:08 Go to previous message
Jean[2] is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: License manager troubles
Next Topic: Re: scripted object graphics question

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

Current Time: Wed Oct 08 15:12:55 PDT 2025

Total time taken to generate the page: 0.00628 seconds