[fpc-pascal] Re:
Matthias Hryniszak
matthias at hryniszak.de
Sun May 29 13:04:18 CEST 2005
----- Original Message -----
From: "listmember" <listmember at letterboxes.org>
To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
Sent: Sunday, May 29, 2005 12:48 PM
Subject: [fpc-pascal] Re:
> Florian Klaempfl wrote:
>
>> It's simply the philosophy of pascal: things which need not to work
>> don't work. The extra type gives no gain, so why should be allowed?
>
> I am not sure it is one of those things that need not work.
>
> You could look at it from a different perspective: It does not
> add any ambiguity to anything at all. Why then disallow it.
>
> I mean, is there really a difference between this:
>
> type
> pMyRec = ^tMyRec;
>
> type
> tMyRec = Record
> data:pointer;
> next:pMyRec;
> end;
>
> and this:
>
> type
> pMyRec = ^tMyRec;
>
> tMyRec = Record
> data:pointer;
> next:pMyRec;
> end;
AFAIK the declaration
type
PMyRecord = ^TMyRecord
is only a forward declaration, that means the TMyRecord type has not been
fully defined yet. Therefore it must be defined in the same section (at
least that's what my good old teacher used to say).
Matthias.
More information about the fpc-pascal
mailing list