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
|
|
0
|
|
|
|
Reply
|
fgg
|
2/24/2011 7:17:32 PM |
|
On Feb 24, 2:17=A0pm, fgg <fabioguimaraesgoncal...@gmail.com> wrote:
> Hi,
>
> I'd like to compile a function from within a procedure, and I'm using RES=
OLVE_ROUTINE for that:
>
> pro test_pro
> =A0 =A0 resolve_routine, 'test_func', /is_function
> =A0 =A0 print, test_func(2)
> end
>
> However, this doesn't seem to be working... if I (1) open the function fi=
le (see below), (2) change the return statement to x^3, (3) close it withou=
t compiling it, and (4) run the procedure above again, it will continue to =
print "4".
>
> function test_func, x
> =A0 =A0 return, x^2
> end
>
> I have no problems if I enter ".COMPILE test_func" at the command line. A=
ny 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
|
|
0
|
|
|
|
Reply
|
Jean
|
2/25/2011 3:08:07 PM
|
|