@ Rolf.
In the compiler manual the following is described
(I have removed "...")
This does not compile - I get the error "Error: Duplicate declaration".
Regards
Merlin.
p.s. I should have said that this is in the interface section of a unit.
pps Here is a work around. Maybe manual needs to be changed? It is more logical any way:
This compiles OK
In the compiler manual the following is described
Code
type TPtr = pointer; forward; // preliminary declaration
TRec1 = record
Ptr1 : TPtr;
end;
TPtr = pointer to Trec1; // main declaration
TRec1 = record
Ptr1 : TPtr;
end;
TPtr = pointer to Trec1; // main declaration
(I have removed "...")
This does not compile - I get the error "Error: Duplicate declaration".
Regards
Merlin.
p.s. I should have said that this is in the interface section of a unit.
pps Here is a work around. Maybe manual needs to be changed? It is more logical any way:
Code
type TRec1 = record; forward; // preliminary declaration
TPtr = pointer to Rec1;
TRec1 = record
Ptr1 : TPtr;
end;
TPtr = pointer to Rec1;
TRec1 = record
Ptr1 : TPtr;
end;
This compiles OK