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

Home » Public Forums » archive » _extra keyword
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: _extra keyword [message #43362 is a reply to message #43326] Thu, 07 April 2005 12:52 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> The problem (and beauty) of _EXTRA is that unknown
> keywords are silently ignored by the procedures that
> use this mechanism. In practice, this means that if you
> misspell a keyword, no one ever complains, but the keyword
> has no effect, either. I strongly suspect that is your
> problem.
>
> One way to handle this problem is to use the _STRICT_EXTRA
> keyword (in place of _EXTRA) on the last procedure or function
> in the keyword inheritance chain. The _STRICT_EXTRA *will*
> complain if it gets a keyword it doesn't understand, so you
> can use this to trap for misspelled keywords.


Just as a programming style note, when I'm in a routine which only
passes extra keywords to one other routine, I always use _STRICT_EXTRA.
That guarantees me that if I mistype something or get a wrong
keyword, the error will be caught.

The only time I don't use _STRICT_EXTRA is if I'm going to pass the
extra arguments to at least two other routines. In this case you'd want
the first routine to ignore the keywords associated with the second and
vice versa. However, I only recommend doing this when it's really
necessary. I've found that extra keywords are much easier to debug and
maintain when you're able to use _STRICT_EXTRA.

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Tough System Variable Question for the IDL Gurus
Next Topic: DICOM write: invalid character for this VR

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

Current Time: Wed Oct 08 17:17:57 PDT 2025

Total time taken to generate the page: 0.00396 seconds