Delphi – E2050 Statements not allowed in interface part

Only declarations, not statements, are allowed in the interface of a unit in your delphi program.

Transfer the procedure bodies to the part where they will be implemented.

unit Produce;

interface

procedure MyProc;
begin                (*<-- Error message here*)
end;

implementation

begin
end.

In the interface portion, we went carried away and gave MyProc a body.

unit Solve;

interface

procedure MyProc;

implementation

procedure MyProc;
begin
end;

begin
end.

The body must be moved to the implementation section, after which everything will be great.