Op Fri, 3 Oct 2008, schreef Graeme Geldenhuys:
On Fri, Oct 3, 2008 at 2:31 AM, Joao Morais <[EMAIL PROTECTED]> 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).
Daniël
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel