type
TUserInfo = record
Name: string;
Age: Integer;
...
end;
TUsers = array of TUserInfo;
var
Users: TUsers;
I: Integer;
begin
SetLength(Users, 10); //设置数组元素为10个
for I := 0 to Length(Users) - 1 do
begin
Users.Name := 'User' + IntToStr(I);
Users.Age := 20;
end;
Users := nil; //清空数组
end;