[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inheritance query



In article <3829BEB9.A3D2D3A6@astro.cornell.edu>,
	"J.D. Smith" <jdsmith@astro.cornell.edu> writes:
> 
> One more tip:  make good use of the _REF_EXTRA mechanism for chaining up to
> methods which should return something:
> 
> pro SubClass::GetProperty,VALUE=val,_REF_EXTRA=e
> 	val=self.value
> 	SuperClass::GetProperty,_EXTRA=e
> end
> 
> This allows the SuperClass's GetProperty Method to put things into variables for
> return (like properties of the SuperClass, which aren't always just data
> member!), impossible with the _EXTRA mechanism.
> 
> JD
> 


Thanks JD for bringing this up! I am just experimenting a little bit 
with objects myself, and came across this _REF_EXTRA in -- I think it was
Struan's -- code. What I don't understand is: why do you use 
_REF_EXTRA in the procedure header but then pass it on to SuperClass
via _EXTRA? I tried to follow the online help on this but couldn't really
find an answer. Is it simply syntax convention that one *always* uses
_EXTRA when calling the routine that accepts _EXTRA or _REF_EXTRA 
keywords? Or is there more to it?

Cheers,
Martin




-- 
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[