procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
AValue: string;
begin
AValue := '0';
if InputQuery('caption', 'input', AValue) then
begin
i := StrToIntDef(AValue, 0);
//然后我想在这里建一个数组 array[i] of integer;
//应该怎么实现这样的功能?
end;
end;
var
i: integer;
AValue: string;
begin
AValue := '0';
if InputQuery('caption', 'input', AValue) then
begin
i := StrToIntDef(AValue, 0);
//然后我想在这里建一个数组 array[i] of integer;
//应该怎么实现这样的功能?
end;
end;
SetLength(x,i);
ArrayName : array of integer;
SetLength(ArrayName,aValue);
begin
a:=setlength(a,i);
end;