I have a class hierarchy, this one:
type
TMatrix = class
protected
//...
public
constructor Create(Rows, Cols: Byte);
//...
type
TMinMatrix = class(TMatrix)
private
procedure Allocate;
procedure DeAllocate;
public
constructor Create(Rows, Cols: Byte);
constructor CreateCopy(var that: TMinMatrix);
destructor Destroy;
end;
So as you see, both derived and base class constructors have the same parameter list. I explicitly call base class constructor from derived one:
constructor TMinMatrix.Create(Rows, Cols: Byte);
begin
inherited;
//...
end;
Is it necessary to explicitly call base class constructor in Delphi? May be I need to put overload or override to clear what I intend to do? I know how to do it in C++ - you need explicit call of a base class constructor only if you want to pass some parameters to it - but I haven`t much experience in Delphi programming.