[fpc-devel] type pointer to record before record.

Alexander Klenin klenin at gmail.com
Sat Apr 30 04:12:23 CEST 2011

On Sat, Apr 30, 2011 at 00:57, Florian Klaempfl <florian at freepascal.org> wrote:
> Am 29.04.2011 15:51, schrieb Flávio Etrusco:
>>> type
>>>  TMyRecord = record
>>>      mPrev : ^TMyRecord; // not allowed.
>>>  end;
>> Marco, only if you happen to know from the top of your head, would it
>> be possible and without consequences to allow this kind of
>> construction? (i.e. a pointer reference to itself)
> No. Because TMyRecord could be already defined in another unit.

Do you mean that ^TMyRecord could refer to a same-named type from the
other unit?
It would be horrible -- but, fortunately, it is not so both in FPC and Delphi.
So I think Flavio's point stands.

Alexander S. Klenin

More information about the fpc-devel mailing list