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

Home » Public Forums » archive » Re: functions as arguments ?
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: functions as arguments ? [message #19042 is a reply to message #19041] Wed, 23 February 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Udo Grabowski (udo.grabowski@imk.fzk.de) writes:

> I'm looking for a way to do something like the Fortran construct
>
> program test
> call proc (func1)
> call proc (func2)
> end
> subroutine proc(func)
> call func
> end
>
> where func1,2 are given external functions defined somewhere.
> Functional arguments are seemingly not possible in IDL, but I found
> a preliminary and ugly solution with a wrapper class:

PRO JUNK
Print, 'In JUNK subroutine'
END

PRO JUNKER
Print, 'In JUNKER subroutine'
END

PRO TEST, func1, func2
Call_Procedure, func1
Call_Procedure, func2
END

IDL> TEST, 'JUNK', 'JUNKER'

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL Voodoo Experts Needed
Next Topic: functions as arguments ?

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

Current Time: Sat Nov 29 14:40:59 PST 2025

Total time taken to generate the page: 0.32158 seconds