Inheritance/Single: Difference between revisions

Content deleted Content added
Petelomax (talk | contribs)
Petelomax (talk | contribs)
Line 1,525:
 
=={{header|OCaml}}==
<syntaxhighlight lang="ocaml">class animal =
class animal =
object (self)
(*functions go here...*)
end</syntaxhighlight>
<syntaxhighlight lang="ocaml">class dog =
object (self)
inherit animal
(*functions go here...*)
end</syntaxhighlight>
<syntaxhighlight lang="ocaml">class cat =
object (self)
inherit animal
(*functions go here...*)
end</syntaxhighlight>
<syntaxhighlight lang="ocaml">class lab =
object (self)
inherit dog
(*functions go here...*)
end</syntaxhighlight>
<syntaxhighlight lang="ocaml">class collie =
object (self)
inherit dog
(*functions go here...*)
end</syntaxhighlight>
</syntaxhighlight>
 
=={{header|Odin}}==