Inheritance/Single: Difference between revisions
Content deleted Content added
+COMAL |
|||
Line 283: | Line 283: | ||
*> ... |
*> ... |
||
END CLASS Collie.</lang> |
END CLASS Collie.</lang> |
||
=={{header|Comal}}== |
|||
{{works with|UniComal or AmiComal}} |
|||
<lang Comal> STRUC Animal |
|||
DIM Name$ OF 20 |
|||
ENDSTRUC Animal |
|||
STRUC Dog |
|||
INHERIT Animal |
|||
DIM Race$ OF 20 |
|||
ENDSTRUC Dog |
|||
STRUC Cat |
|||
INHERIT Animal |
|||
DIM Race$ OF 20 |
|||
ENDSTRUC Cat |
|||
STRUC Lab |
|||
INHERIT Dog |
|||
FUNC New CONSTRUCTOR |
|||
Race$:="Lab" |
|||
ENDFUNC New |
|||
ENDSTRUC Lab |
|||
STRUC Collie |
|||
INHERIT Dog |
|||
FUNC New CONSTRUCTOR |
|||
Race$:="Collie" |
|||
ENDFUNC New |
|||
ENDSTRUC Collie</lang> |
|||
=={{header|Coco}}== |
=={{header|Coco}}== |