Inheritance/Multiple: Difference between revisions

no edit summary
No edit summary
Line 361:
interface Camera with
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}}==