Inheritance/Single: Difference between revisions

Content deleted Content added
Util (talk | contribs)
m →‎{{header|ChucK}}: Filled in "lang" tags
Line 551: Line 551:
:: Lab extends Dog end-extends {} ;
:: Lab extends Dog end-extends {} ;
:: Collie extends Dog end-extends {} ;</lang>
:: Collie extends Dog end-extends {} ;</lang>


Works with any ANS Forth

Needs the FMS-SI (single inheritance) library code located here:
http://soton.mpeforth.com/flag/fms/index.html
<lang forth>include FMS-SI.f

:class Animal <super object ;class
:class Dog <super Animal ;class
:class Cat <super Animal ;class
:class Lab <super Dog ;class
:class Collie <super Dog ;class</lang>


=={{header|Fortran}}==
=={{header|Fortran}}==