octave-maintainers
[Top][All Lists]
Advanced

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

Re: FYI: subasgn argument optimization


From: Judd Storrs
Subject: Re: FYI: subasgn argument optimization
Date: Sat, 15 Aug 2009 21:46:26 -0400

Sorry, I found a typo in @foo/access.m. I typed "disp(obj,yy)" instead of "disp(obj.yy)" by accident (comma instead of period).

With this version

@foo/access.m:
function access(obj)
    disp(obj.xx) ;
    disp(obj.yy) ;
end

Then the inherited function uses the parent's values.

>> b = bar() ;
>> access(b)
    10
    20

These are the values from the parent class. It is still true that subclasses cannot access parent class fields and that non-existent fields are not forwarded. Sorry for any confusion.

--judd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]