Inheritance/Single: Difference between revisions
Content deleted Content added
No edit summary |
make J implementation typical, with each class defined in a different script |
||
Line 278: | Line 278: | ||
=={{header|J}}== |
=={{header|J}}== |
||
<lang J> |
<lang J>coclass 'Animal'</lang> |
||
⚫ | |||
saveLocaleName_base_ =. coname '' NB. save name of current locale |
|||
coinsert 'Animal'</lang> |
|||
coclass ' |
<lang J>coclass 'Cat' |
||
coinsert 'Animal' |
coinsert 'Animal'</lang> |
||
coclass 'Lab' |
<lang J>coclass 'Lab' |
||
coinsert 'Dog' |
coinsert 'Dog'</lang> |
||
coclass 'Collie' |
<lang J>coclass 'Collie' |
||
coinsert 'Dog' |
coinsert 'Dog'</lang> |
||
⚫ | |||
coinsert 'Animal' |
|||
cocurrent saveLocaleName_base_ NB. go back to starting locale |
|||
</lang> |
</lang> |
||