Re: Is IDL-to-C-to-IDL call possible? [message #33619] |
Mon, 13 January 2003 21:42 |
Keh-Cheng Chu
Messages: 2 Registered: January 2003
|
Junior Member |
|
|
In article <on65ssgxcq.fsf@cow.physics.wisc.edu>, Craig Markwardt wrote:
>
> Keh-Cheng Chu <kehcheng@quake.Stanford.EDU> writes:
>
>> I would like to build DLM's containing system routines that take
>> IDL functions as arguments like the built-in QSIMP(Func,A,B) does.
>> To evaluate the user-defined function Func, obviously the system
>> routine needs to make calls to the IDL interpreter. Are such
>> calls possible (the External Development Guide doesn't seem to
>> mention them)? Can someone show me a simple example?
>
> How about IDL_Execute() and IDL_ExecuteStr()?
>
> Good luck,
> Craig
>
These functions are described in the Callable IDL chpater of the
External Development Guide with the following stern warning:
... their use in code called by IDL via CALL_EXTERNAL or
a system routine (LINKIMAGE, DLM) is not supported and
is certain to corrupt and/or crash the IDL process.
Even if I manage to call them without crashing the IDL process,
I still don't see how I can execute an arbitrarily named user
function; it seems to me that some kind of function pointer is
needed here.
Maybe I should change my question to this: does anybody know
how QSIMP and many other built-in system routines that take
function arguments are implemented internally?
Thanks again,
Keh-Cheng
|
|
|
Re: Is IDL-to-C-to-IDL call possible? [message #33620 is a reply to message #33619] |
Mon, 13 January 2003 20:37  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Keh-Cheng Chu <kehcheng@quake.Stanford.EDU> writes:
> I would like to build DLM's containing system routines that take
> IDL functions as arguments like the built-in QSIMP(Func,A,B) does.
> To evaluate the user-defined function Func, obviously the system
> routine needs to make calls to the IDL interpreter. Are such
> calls possible (the External Development Guide doesn't seem to
> mention them)? Can someone show me a simple example?
How about IDL_Execute() and IDL_ExecuteStr()?
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|