[Lazarus] Forward declare (modern) records [was: Re: "global" operator overloading]

Jürgen Hestermann juergen.hestermann at gmx.de
Tue Feb 26 18:22:35 CET 2013


Am 2013-02-26 16:15, schrieb ListMember:
>
> Is it possible to forward declare records the way we can with classes?
>

Well, I know that you can do something like this:

      PTreeType    = ^TreeType;
      TreeType   = record
                             ...;
                             ...;
                             Dirs : PListType;
                             end; { of record }

You can see that "TreeType" is used in the first line although it is not (yet) defined.
As long as you declare the type within the same "Type" section the compiler swallows it.




More information about the Lazarus mailing list