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

Home » Public Forums » archive » RESOLVE_ROUTINE not finding MEDIAN 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: RESOLVE_ROUTINE not finding MEDIAN function? [message #81197 is a reply to message #81101] Fri, 17 August 2012 08:59 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
John Correira writes:

> So then I can't use ROUTINE_INFO on it?

Right. :-)

> IDL> info = ROUTINE_INFO('median',/FUNCTIONS,/PARAMETERS)
> % Attempt to call undefined procedure/function: 'MEDIAN'.
> % Execution halted at: $MAIN$
>
> I'm writing a procedure that you pass a function name to as a string
> parameter, and then that function is used later on in the procedure. I'm
> trying to include a check for cases where the caller includes keywords
> but the function does not accept keywords, most likely a user written
> function. The most obvious way seems to be ROUTINE_INFO, i.e.
>
> takeskeywords =
> ((ROUTINE_INFO(functname,/FUNCTIONS,/PARAMETERS)).NUM_KW_ARG S GT 0)
>
>
> but it seems as if that does not work for system routines. Any other
> suggestions?

For system routines, you really have only two choices.
(1) Read the documentation and hardcode the information you
need into your program, or (2) call the system routine and
CATCH any program errors and handle it in whatever way is
appropriate.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: fft and least sqaues problem
Next Topic: Copying a hash

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

Current Time: Sun Oct 12 10:59:33 PDT 2025

Total time taken to generate the page: 1.20030 seconds