张
张辉明
Unregistered / Unconfirmed
GUEST, unregistred user!
SERVER:(WarningAraay:Tstrings
var
i:integer;
strs:Tstrings;
begin
with mainformdo
begin
strs:=TStringList.Create ;
Result := VarArrayCreate([0,WarningAraay.Count-1 ], varVariant);
for i := 0 to WarningAraay.Count-1do
Result := WarningAraay.Strings;
end;
end;
client:
var
templeVariant;
i:integer;
strs:TStrings;
begin
try
Strs:=TStringList.Create ;
Temp:=VarArrayCreate([0,1],varvariant);
temp:=gsys.Gdcomsrv.AppServer.GetAnnumciator;
if varisarray(temp) then
begin
for i:=0 to vararrayhighbound(temp,1)do
strs.add(temp);
memo1.Lines.text:=strs.text;
end;
except
raise exception.Create('无法获取报警码信息!');
end;
当服务器端时,client可以正常取得信息,但当WarningAraay.count=0
时,就执行 raise exception.Create('无法获取报警码信息!');语句了,虽然我可以
把raise语句去掉,但我不想这么做。
var
i:integer;
strs:Tstrings;
begin
with mainformdo
begin
strs:=TStringList.Create ;
Result := VarArrayCreate([0,WarningAraay.Count-1 ], varVariant);
for i := 0 to WarningAraay.Count-1do
Result := WarningAraay.Strings;
end;
end;
client:
var
templeVariant;
i:integer;
strs:TStrings;
begin
try
Strs:=TStringList.Create ;
Temp:=VarArrayCreate([0,1],varvariant);
temp:=gsys.Gdcomsrv.AppServer.GetAnnumciator;
if varisarray(temp) then
begin
for i:=0 to vararrayhighbound(temp,1)do
strs.add(temp);
memo1.Lines.text:=strs.text;
end;
except
raise exception.Create('无法获取报警码信息!');
end;
当服务器端时,client可以正常取得信息,但当WarningAraay.count=0
时,就执行 raise exception.Create('无法获取报警码信息!');语句了,虽然我可以
把raise语句去掉,但我不想这么做。