Multiple inheritance
December 30th, 2008
| Tags: 2.0, multiple inheritance, object, oriented, PPL
The PPL object-oriented syntax has evolved once more for version 2.0. It now includes multiple inheritance, which allow you to inherit a class from multiple other classes.
#class MyClass1
Private(a$);
#endclass#class MyClass2
Private(b$);
#endclass#class MyClass3 inherit MyClass1, MyClass2
a$ = 10;
b$ = 20;public proc test
ShowMessage(a$, “,”, b$);
end;
#endclassproc main
o$ = new MyClass3;
o.test;
end;
This allow for very powerful applications. You can inherit as many classes as you want, there are no limits. The inherited classes can also inherit from other classes, which can lead to very complex but highly maintainable code.
Leave a comment
| Trackback


