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

Home » Public Forums » archive » Inheritance query
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: Inheritance query [message #17770 is a reply to message #17640] Thu, 11 November 1999 00:00 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Martin Schultz, m218003@modell3.dkrz.de writes:

> why do you use _REF_EXTRA in the procedure header
> but then pass it on to SuperClass via _EXTRA?

I freely admit that I don't understand the help files for _EXTRA
and _REF_EXTRA. I found by trial and error that the way I do it in my
SLFoWid examples allows extra keywords to be passed through to
procedures *and* for the results to be passed back to the main program
level. That is, if you have three procedures:


pro level3, result3=result3, _ref_extra=extra
result3=3
end


pro level2, result2=result2, _ref_extra=extra
result2=2
level3, _extra=extra
end


pro level1, result1=result1, _ref_extra=extra
result1=1
level1, _extra=extra
end

and call: level1, result1=result1, result2=result2, result3=result3
you end up with the expected numbers in result1,2,3.

The downside is that the intermediate procedures have no access to
keywords other than their own (ie, in level2, the variable result3 is
undefined, even after the call to level3). In object programming this
enforces a tidy programming style, where parameters are only dealt
with at the object level where they are declared, but in general that
might be too strong a restriction and then the only cure (that I
found) is to add the wanted keywords to the intermediate procedures
explicitly.


Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLSpecII: IDL Speed Survey Redux!
Next Topic: ATAN inconsistencies

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

Current Time: Fri Oct 10 13:46:01 PDT 2025

Total time taken to generate the page: 0.40225 seconds