Z
zyf23
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure Tcommmain.aaa(aa: variant);
interface
procedure Tcommmain.Button1Click(Sender: TObject);
var
aay :array of byte;
i:integer;
begin
setlength(aay ,6);
for i :=0 to 14 do //此处改为5时就不会有问题出现,我是说程序最后
begin
aay:=12
//为什么问题不再此处
end;
aaa(aay);
end;
procedure Tcommmain.aaa(aa: variant);
var
aad:array of byte;
i:integer;
begin
setlength(aad,10)
aad:=aa;
for i :=0 to 10 do //此处不为5也可以,不会提示出错
begin
showmessage(inttostr(i)+':'+inttostr(aad));
end;
end;
//提示时:无效的指针操作!
interface
procedure Tcommmain.Button1Click(Sender: TObject);
var
aay :array of byte;
i:integer;
begin
setlength(aay ,6);
for i :=0 to 14 do //此处改为5时就不会有问题出现,我是说程序最后
begin
aay:=12
//为什么问题不再此处
end;
aaa(aay);
end;
procedure Tcommmain.aaa(aa: variant);
var
aad:array of byte;
i:integer;
begin
setlength(aad,10)
aad:=aa;
for i :=0 to 10 do //此处不为5也可以,不会提示出错
begin
showmessage(inttostr(i)+':'+inttostr(aad));
end;
end;
//提示时:无效的指针操作!