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

Home » Public Forums » archive » Re: Getting generic routine to call function.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Getting generic routine to call function. [message #1414 is a reply to message #1413] Fri, 19 November 1993 06:09 Go to previous messageGo to previous message
saken is currently offline  saken
Messages: 6
Registered: November 1993
Junior Member
In article <2ci6klINNc52@freud.dra.hmg.gb>, black@signal.dra.hmg.gb (John Black) writes:
|> Ooops, Sorry managed to somehow post a zero length message
|>
|> OK that message again.
|>
|> Here's the situation. I have a generic numerical routine such as a numerical
|> integration routine, or a Newton-Raphson routine. Ideally I'd like to write
|> them so that they can operate on any routine that evaluates a function.
|> However IDL/WAVE doesn't seem to allow you to pass the name of the routine
|> that evaluates a function into the generic routine, so that the generic
|> routine can use it. This situation is obviously best if it can be achieved,
|> because it means that you don't have to have multiple copies of the generic
|> routine all caled something different, but only differ in detail in that they
|> call a different function evaluating routine
|>
|> So has anyone come up with a way to do this or a way to structure code to
|> get around this problem?
|>
|> Thanks in advance,


The CALL_FUNCTION command sounds like what you want. Something like
this:

pro generic,p1,p2,p3,...,name=name
.
.
.
result = call_function(name,p1,p2,p3)
.
.
.

"name" would be the name of the evaluating function and "result" would be
the value returned. Is this what you wanted?

jon saken
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Creating shared libs with gcc ?
Next Topic: HDF's Vdata

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

Current Time: Fri Oct 10 22:42:39 PDT 2025

Total time taken to generate the page: 0.64283 seconds