张 张无忌 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-10 #21 不会把,类型一样啊, C: Array [1..3] of Char 和 buf:array[1..1024]of char;类型不一样,笑话把?
D delphi_初学者 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-11 #22 张兄:我调试时确实是出现了这样的提示,我也弄不明白,还请多多指教!
白 白河愁 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-11 #24 最保险是这样 procedure TForm1.Button1Click(Sender: TObject); var i:integer r:string; C: Array [1..3] of Char; begin C := 'cat'; r:='' for i:=1 to 3 do r:=r+c; NMUDP1.RemoteHost := '127.0.0.1'; NMUDP1.ReportLevel := Status_Basic; NMUDP1.LocalPort := 6668; NMUDP1.RemotePort := 6668; NMUDP1.SendBuffer(r, length(r)); end;
最保险是这样 procedure TForm1.Button1Click(Sender: TObject); var i:integer r:string; C: Array [1..3] of Char; begin C := 'cat'; r:='' for i:=1 to 3 do r:=r+c; NMUDP1.RemoteHost := '127.0.0.1'; NMUDP1.ReportLevel := Status_Basic; NMUDP1.LocalPort := 6668; NMUDP1.RemotePort := 6668; NMUDP1.SendBuffer(r, length(r)); end;
P programsky Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-22 #25 Array [1..3] of Char array[1..1024]of char;是两个不相同的类型吧,基类型是一样的
蛮 蛮牛野蛮牛 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-22 #26 教你一个最笨的! var iLoop:integer cA:array [1..1024] of char begin for iLoop:=1 to Length(myStr) do cA[iLOOP]:=myStr; end 一个好点的; move(cA,@myStr[1],Length(myStr))
教你一个最笨的! var iLoop:integer cA:array [1..1024] of char begin for iLoop:=1 to Length(myStr) do cA[iLOOP]:=myStr; end 一个好点的; move(cA,@myStr[1],Length(myStr))
张 张无忌 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-22 #27 TO programsky: 我的意思是基类型是一样的,就是 var buf;