Inheritance/Multiple: Difference between revisions

Content added Content deleted
No edit summary
Line 361: Line 361:
interface Camera with
interface Camera with
member x.takePicture() = new Picture(10, 10)</lang>
member x.takePicture() = new Picture(10, 10)</lang>

=={{header|Forth}}==
{{works with|Forth}}
Works with any ANS Forth. This extension fully supports true multiple inheritance.
Needs the FMS-MI (multiple inheritance) library code located here:
http://soton.mpeforth.com/flag/fms/index.html
<lang forth>include FMS-MIBuildGen.f
include FMS-MIHarnGen.f
include FMS-MI.f

:class Camera
;class
:class MobilePhone
;class

:class CameraPhone super{ Camera MobilePhone } \ any number of superclasses may be used
;class
CameraPhone cf \ instantiate a CameraPhone object named cf</lang>


=={{header|Go}}==
=={{header|Go}}==