[fpc-devel] Record with dynamic array of same type

dmitry boyarintsev skalogryz.lists at gmail.com
Wed Dec 9 15:28:54 CET 2009


On Wed, Dec 9, 2009 at 5:22 PM, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
> I guess it should be possible to give an error similar to what Kylix does:
>  tt.pp(9) Error: Type 'TMyRecord' is not yet completely defined

if dynamic arrays are actually pointers, why the record should not be
completely defined?
Isn't using dynamic array would be something similar to this:

PMyRecord =^TMyRecord;
TMyRecord = record
 Id: Integer;
 Name: String;
 ChildRecords: PMyRecord;
 ChildCount: Integer; // implicit dynamic array field.
end;

thanks,
dmitry



More information about the fpc-devel mailing list