uses crt; type ta = object error: ^string; constructor init(st: string); procedure print; virtual; end; constructor ta.init; begin new(error); error^ := st; end; procedure ta.print; begin writeln('TA object') end; procedure proc(var obj: ta); begin writeln('error = ', obj.error^); obj.print; end; type ta2 = object(ta) constructor init(st: string); procedure print; virtual; end; constructor ta2.init; begin inherited init(st) end; procedure ta2.print; begin writeln('TA2 object') end; type tb = object(ta2) constructor init(st: string); procedure print; virtual; end; constructor tb.init; begin {inherited init(st);} end; procedure tb.print; begin writeln('TB object') end; var A: ta; B: ta2; c: tb; begin clrscr; a.init('no error'); proc(a); b.init('no error'); proc(b); c.init('no error'); proc(c); end.