H
happyxxyboy
Unregistered / Unconfirmed
GUEST, unregistred user!
想把一个动态数组作为一个function 的变量,这个动态数组是一个记录类型(record),请问怎么做变量!
如下
定义一个记录类型(record),用动态数组存放记录类型
type
Tmydata=record
id:integer;
name:string;
end;
var
dataary:array of Tmydata;
function tform1.getmmb(oid,comm,receivetm:string:tsl:array of Tmydata):boolean;
begin
try
setlength(tsl,.ValueCount);
for I := 0 to .ValueCount - 1 do
begin
tsl.id:=.ValueOID;
tsl.name:=Value;
end;
result:=true;
finally
end;
end;
如下
定义一个记录类型(record),用动态数组存放记录类型
type
Tmydata=record
id:integer;
name:string;
end;
var
dataary:array of Tmydata;
function tform1.getmmb(oid,comm,receivetm:string:tsl:array of Tmydata):boolean;
begin
try
setlength(tsl,.ValueCount);
for I := 0 to .ValueCount - 1 do
begin
tsl.id:=.ValueOID;
tsl.name:=Value;
end;
result:=true;
finally
end;
end;