Re: keyword inheritance question [message #87168 is a reply to message #87167] |
Mon, 13 January 2014 16:54   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Matthew Argall writes:
> Say I am writing a program (myPro) that uses two other programs (libPro[1-2]) and want to be able to let the user know that the keyword they gave does not exist.
>
> Ideally, I would use _STRICT_EXTRA to do this. I cannot in this case, though.
>
> As a solution, I can put the keywords of libPro1 into the keyword list of myPro. Alternatively, I could just bite the bullet and use _EXTRA, letting unused keywords fall through quietly.
>
> Any advice/preferences/pet peeves on this?
Oh, don't even get me started on keyword inheritance. It starts off
sounding like *such* a good idea, but it is like adopting a wolf puppy.
What could possibly go wrong?
Then, it turns on you and bites you in the butt. Maybe not right away
(so sweet!), but eventually, and inevitably.
If you are going to use it, I would be very, very careful and ALWAYS
pass the final keyword structure with _STRICT_EXTRA. There is only one
thing worse than something taking a bite out of your butt, and that is
searching for hours and hours for misspelled keywords. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|