type
rec1 = record
A, B: string;
end;
rec1Arr = array of rec1;
rec2 = record
C, D: string;
end;
rec2Arr = array of rec2;
rec3 = record
E, F: string;
end;
rec3Arr = array of rec3;
TMyRec = record
type
TAll = record
A,B,C,D,E,F : string;
end;
private
function GetAll(Index: integer): TAll;
procedure SetAll(Index: integer; const Value: TAll);
public
R1: rec1Arr;
R2: rec2Arr;
R3: rec3Arr;
property All[Index: integer]: TAll read GetAll write SetAll; default;
end;
{ TMyRec }
function TMyRec.GetAll(Index: integer): TAll;
begin
Result.A:=R1[index].A;
Result.B:=R1[index].B;
Result.C:=R2[index].C;
Result.D:=R2[index].D;
Result.E:=R3[index].E;
Result.F:=R3[index].F;
end;
procedure TMyRec.SetAll(Index: integer; const Value: TAll);
begin
if Length(R1)<=Index then SetLength(R1,Index+1);
if Length(R2)<=Index then SetLength(R2,Index+1);
if Length(R3)<=Index then SetLength(R3,Index+1);
R1[index].A:=Value.A;
R1[index].B:=Value.B;
R2[index].C:=Value.C;
R2[index].D:=Value.D;
R3[index].E:=Value.E;
R3[index].F:=Value.F;
end;
procedure Test;
var
Arr : TMyRec;
Rec : TMyRec.TAll;
begin
Rec.A:='1';
Rec.B:='2';
Rec.C:='3';
Rec.D:='4';
Rec.E:='5';
Rec.F:='6';
Arr[1]:=Rec;
Writeln(Arr[1].A,',',Arr[1].B,',',Arr[1].C,',',Arr[1].D,',',Arr[1].E,',',Arr[1].F);
end;
И вот, поддержите еще:
https://quality.embarcadero.com/browse/RSP-22953