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

Home » Public Forums » archive » ROUTINE_INFO problems
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
ROUTINE_INFO problems [message #30204] Wed, 10 April 2002 15:12
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
Mark Hadfield wrote:

> Try the ROUTINE_INFO function with keyword PARAMETERS set and examine
> the KW_ARGS tag in the structure it returns. (I found this in the docs
> & I haven't tried it myself.) Just out of curiosity, why do you want to
> do this?

Hi Mark,

Thanks for the tip. ROUTINE_INFO sounded like exactly what I want, but
I played with it for a bit and it doesn't work as expected, at least not
for system routines like PLOT. In fact, I can't imagine it does what
anyone wants with system routines, since the PARAMETERS structure it
returns is just wrong. Here is the output for the 'PLOT' procedure.

IDL> plotParams = ROUTINE_INFO('PLOT', /PARAMETERS)
IDL> PRINT, plotParams.num_args
0
IDL> PRINT, plotParams.num_kw_args
0

That's not right. I tried ROUTINE_INFO on PTR_FREE and even on itself,
but the results were the same. Probably this is all documented or I'm
just messing up, but why does ROUTINE_INFO return the PARAMETERS
structure for system routines if it's going to lie about it ?

The parameter information it returns for non-system routines also could
be more complete. If a routine uses keyword inheritance and passes along
an _EXTRA structure to a subroutine, then the KW_ARGS field of the
PARAMETERS structure returned by ROUTINE_INFO only contains the word
'_EXTRA.' It would be more useful to know *all* the keywords that could
be passed to the routine, including keywords of any subroutines called
with _EXTRA .

I want this information because I'm toying around with an idea that will
probably go nowhere. I'm trying to the use the keywords as Get/Set-able
properties of an object class, if that makes any sense.

So is there any way to ascertain all the keywords accepted by any IDL
routine, including keywords of system routines and including keywords
inherited from subroutines?

Thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Ascertaining Keyword Parameters
Next Topic: floating underflow errors

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

Current Time: Wed Oct 08 14:21:58 PDT 2025

Total time taken to generate the page: 0.00400 seconds