The following code does not compile:
Code: Select all
Unit Myunit;
...
procedure MyProc; //prototype
...
implementation
...
procedure MyProc; //compiler error: Procedure MyProc already defined.
begin
...
end;
So, we have to remove the prototype definition to be able to compile.
BUT that leads to the unwanted situation that the "implementation" section of a unit does not what it main task should be: "Encapsulating". Currently all procedures and function defined within the implementation section are visible from outside and prototypes lead to compiler error.
Johannes