help-octave
[Top][All Lists]
Advanced

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

Did I miss something about structures and function handles


From: kensmith
Subject: Did I miss something about structures and function handles
Date: Sat, 18 Aug 2007 09:05:42 -0700
User-agent: KMail/1.9.1

I can say:

b.a=@(X)(disp(X-3))

if I then say

c = b
c.a(7)

I get 4 as expected.

This looks to me like 90% of object oriented programming is in octave.  
Is there some way that I can get at the other elements of "b" and "c" 
from the member "a".

If so, then objects could be done.  You would just have to make a 
template version of the type you want and then assign it to any 
instances you want to make.  Creating a child type would be done by 
first assigning the template of the parent  to the template of the 
child and then assigning the new elements.

Because of the way octave works, virtual methods would already be there 
too.









-- 
address@hidden


reply via email to

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