Inheritance/Single: Difference between revisions
m
→{{header|J}}
(add JavaScript, clean whitespace) |
m (→{{header|J}}) |
||
Line 256:
Here is how this would normally be done:
<lang
<lang
coinsert 'Animal'</lang>
<lang
coinsert 'Animal'</lang>
<lang
coinsert 'Dog'</lang>
<lang
coinsert 'Dog'</lang>
See http://www.jsoftware.com/help/jforc/modular_code.htm
That said, some operations in J -- including <code>coinsert</code> -- will create classes if they did not already exist. So the above may be simplified to:
<lang
coinsert_Cat_ 'Animal'
coinsert_Lab_ 'Dog'
coinsert_Collie_ 'Dog'</lang>
=={{header|Java}}==
|