----- Original Message ----- From: "listmember" <[EMAIL PROTECTED]>
To: "FPC-Pascal users discussions" <fpc-pascal@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.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to