Abstract type: Difference between revisions

Content added Content deleted
Line 364: Line 364:
void bar() { }
void bar() { }
}</lang>
}</lang>

=={{header|Delphi}}==
<lang delphi>type
TMyObject = class(TObject)
public
procedure AbstractFunction; virtual; abstract; // Your virtual abstract function to overwrite in descendant
procedure ConcreteFunction; virtual; // Concrete function calling the abstract function
end;

implementation

procedure TMyObject.ConcreteFunction
begin
AbstractFunction; // Calling the abstract function
end;</lang>


=={{header|E}}==
=={{header|E}}==