Rekursion, das Wort heißt Rekursion!
Delphi-Quellcode:
procedure WriteObject(Obj: TMyObjectte; AStream: TFileStream);
var i,s: Integer;
begin
s := length(Obj.Name);
AStream.Write(s,sizeof(s));
AStream.Write(Obj.Name[1],s);
for i := 0 to Obj.ChildCount-1 do
WriteObject(Obj.Childs[i],AStream);
end;
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1