米
米度斯
Unregistered / Unconfirmed
GUEST, unregistred user!
怎样读写类中的数组?
type
Tdtx=class
public
len:integer;
Anum:array[0..6] of integer;
procedure initialize;
end;
procedure Tdtx.initialize;
var
i:integer;
begin
len:=0;
for i:=0 to 6 do
Anum:=0;
end
procedure Tform1.Button1Click(Sender: TObject);
var
n:Tdtx;
i:integer;
begin
n.initialize;
n.len:=3;
for i:=0 to n.len-2 do
n.Anum:=i;
end;
为何len可以修改,但是Anum修改时会报错?该怎样修改!求各位高手指点!
type
Tdtx=class
public
len:integer;
Anum:array[0..6] of integer;
procedure initialize;
end;
procedure Tdtx.initialize;
var
i:integer;
begin
len:=0;
for i:=0 to 6 do
Anum:=0;
end
procedure Tform1.Button1Click(Sender: TObject);
var
n:Tdtx;
i:integer;
begin
n.initialize;
n.len:=3;
for i:=0 to n.len-2 do
n.Anum:=i;
end;
为何len可以修改,但是Anum修改时会报错?该怎样修改!求各位高手指点!