比
比尔
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure dosth;
var
s : array of TPoint;
begin
setLength(s,100);
...
??要不要销毁?
end;
var
s : array of TPoint;
begin
setLength(s,100);
...
??要不要销毁?
end;
const
Len = 10;
var
StrArr: array of string;
PStr: ^string;
I: Byte;
begin
SetLength(StrArr, Len);
for I := 0 to Len - 1 do
StrArr[I] := IntToStr(I);
PStr := @StrArr[0];
StrArr := nil;
for I := 0 to Len - 1 do
begin
ShowMessage(PStr^);
Inc(PStr);
end;
var
PStr: ^string;
procedure TForm1.Button1Click(Sender: TObject);
const
Len = 10;
var
StrArr: array of string;
I: Byte;
begin
SetLength(StrArr, Len);
for I := 0 to Len - 1 do
StrArr[I] := IntToStr(I);
PStr := @StrArr[0];
// StrArr := nil;
end;
procedure TForm1.Button2Click(Sender: TObject);
const
Len = 10;
var
I: Byte;
begin
for I := 0 to Len - 1 do
begin
ShowMessage(PStr^);
Inc(PStr);
end;
end;