Abstract type: Difference between revisions
Content deleted Content added
Added BBC BASIC |
Added Forth version |
||
Line 565:
}
</lang>
=={{header|Forth}}==
{{works with|4tH|3.61.5}}
{{trans|Fantom}}
There are numerous, incompatible object oriented frameworks for Forth. This one works with the FOOS preprocessor extension of [[4tH]].
<lang forth>include 4pp/lib/foos.4pp
:: X()
class
method: method1
method: method2
end-class {
:method { ." Method 1 in X" cr } ; defines method1
}
;
:: Y()
extends X()
end-extends {
:method { ." Method 2 in Y" cr } ; defines method2
}
;
: Main
static Y() y
y => method1
y => method2
;
Main</lang>
=={{header|F Sharp|F#}}==
|