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

Home » Public Forums » archive » Re: Is IDL-to-C-to-IDL call possible?
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: Is IDL-to-C-to-IDL call possible? [message #33619] Mon, 13 January 2003 21:42
Keh-Cheng Chu is currently offline  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 Go to previous message
Craig Markwardt is currently offline  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
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 2-D Density Plots
Next Topic: Somewhat flummoxed: 'Expression must be a scalar in this context'

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

Current Time: Wed Oct 08 18:13:30 PDT 2025

Total time taken to generate the page: 0.00613 seconds