G
guxingren
Unregistered / Unconfirmed
GUEST, unregistred user!
以下是我写的一段程序运行之后出现了:发送错误的提示.望大侠们指教错在哪里,应如何改正!!
procedure TForm1.senddataClick(Sender: TObject);
var
strchar;
count:integer;
begin
str:=pchar(memo1.Text);
count:=length(str);
if comm1.WriteCommData (str,count) then
Memo1.Lines.Add('已发送'+inttostr(count)+'个字节')
else
raise exception.create('发送错误');
end;
procedure TForm1.senddataClick(Sender: TObject);
var
strchar;
count:integer;
begin
str:=pchar(memo1.Text);
count:=length(str);
if comm1.WriteCommData (str,count) then
Memo1.Lines.Add('已发送'+inttostr(count)+'个字节')
else
raise exception.create('发送错误');
end;