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

Home » Public Forums » archive » Using _extra for all routines?
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
Using _extra for all routines? [message #5177] Fri, 13 October 1995 00:00
knight is currently offline  knight
Messages: 37
Registered: January 1992
Member
Does anybody see any drawback to including _extra as a keyword in ALL
procedures and functions? My motivation is to allow keywords passed through to
multiple routines inside others. Here's an example:

PRO upper,_extra=extra ; accept all keywords
lower0,_extra=extra ; pass all keywords but some may be for lower1
lower1,_extra=extra ; likewise for lower0
return
end
PRO lower0,key0=key0,_extra=extra ; accept all keywords
print,key0
return
end
PRO lower1,key1=key1,_extra=extra ; accept all keywords
print,key1
return
end

Then an allowable usage for upper would be:

upper,key0='pass to lower0',key1='pass to lower1'

In other words, I've passed keywords to two routines by allowing each to accept
ANY keyword.

Is this ok? One drawback might be ambiguity, two keywords whose names
conflict. Does anybody see any other drawbacks?

Thanks,
Fred



--
=Fred Knight (knight@ll.mit.edu) (617) 981-2027
C-483\\MIT Lincoln Laboratory\\244 Wood Street\\Lexington, MA 02173
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: spline interpolation
Next Topic: Re: Advanced Development Guide for IDL

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

Current Time: Wed Oct 08 19:00:09 PDT 2025

Total time taken to generate the page: 0.00537 seconds