[fpc-pascal] Re: weird compile error message
Xiangrong Fang
xrfang at gmail.com
Thu Sep 12 03:13:19 CEST 2013
Hi Sven,
Additional note: The "PTree = ^TTree" in front of the "TTree" is wrong and
> only supported by pre-2.7.1 FPC by accident. The correct code would be:
>
I removed PTree yesterday and this problem is gone. I now understand that
it is not necessary to define PTree as TTree is a pointer anyway. However,
I don't understand why it is WRONG. I mean, is the problem I reported
caused by this definition? If so, why it disappeared while the
debug-info-generation option is turned off?
Say, the following is normal in pascal:
type
PMyRecord = ^TMyRecord;
TMyRecord = record
... ...
end;
Why it is wrong to define PTree = ^TTree? Is it because that this kind of
pointer definition is:
1. only valid for record, but not class?
2. only valid for record and NON-generic class?
Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130912/d4d1f030/attachment.html>
More information about the fpc-pascal
mailing list