[fpc-devel] circular uses clauses

Daniël Mantione daniel.mantione at freepascal.org
Fri Oct 3 08:57:49 CEST 2008

Op Fri, 3 Oct 2008, schreef Graeme Geldenhuys:

> On Fri, Oct 3, 2008 at 2:31 AM, Joao Morais <post at joaomorais.com.br> wrote:
>> Because a Pascal compiler parses the interface section of an unit only once,
> That would make sense. And probably the reason why FPC and Delphi are
> such fast compilers compared to C compilers.

Yes, the interface contains all information the compiler needs to call a 
procedure. Once this is known the compiler can call procedures in a unit 
without having compiled the implementation yet. This is why 
implementations can use each other (a procedure call to a not yet compiled 
unit is no problem), but interfaces cannot (a reference to a type in a not 
yet compiled interface is problematic, because it affects how procedures 
are called).


More information about the fpc-devel mailing list