J
javaa
Unregistered / Unconfirmed
GUEST, unregistred user!
在delphi中用mscomm通讯接收数据:
var
receive:variant;
a:array of byte;
i:integer;
procedure
receive:=mscomm1.input;
n:=0;
for i:=0 to 128 do
beging
a:=receive[n];
n:=n+1;
end;
现在问题是n只要大于127,就报variant out of bound ,我查了资料说variant只是可用做
短整型(<128),我现在只能接收<128个byte,如何解决?
var
receive:variant;
a:array of byte;
i:integer;
procedure
receive:=mscomm1.input;
n:=0;
for i:=0 to 128 do
beging
a:=receive[n];
n:=n+1;
end;
现在问题是n只要大于127,就报variant out of bound ,我查了资料说variant只是可用做
短整型(<128),我现在只能接收<128个byte,如何解决?