RosettaCodeData/Task/Inheritance-Single/Component-Pascal/inheritance-single.pas

7 lines
278 B
ObjectPascal
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
TYPE
Animal = ABSTRACT RECORD (* *) END;
Cat = RECORD (Animal) (* *) END; (* final record (cannot be extended) - by default *)
Dog = EXTENSIBLE RECORD (Animal) (* *) END; (* extensible record *)
Lab = RECORD (Dog) (* *) END;
Collie = RECORD (Dog) (* *) END;