Q qmwuu Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #1 如题。 例如:我现在有一个字符串: s:array[0..10] of String; 如何将其转换成byte
3 3304xfq Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #3 var abc:String; var isPCharChar; var isChar:Char; begin abc:='Delphi'; isPchar:=PChar(abc[0]); ispchar值是字符D isChar:=Char(abc[0]); end;
var abc:String; var isPCharChar; var isChar:Char; begin abc:='Delphi'; isPchar:=PChar(abc[0]); ispchar值是字符D isChar:=Char(abc[0]); end;
太 太阳河上 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #5 应该这样吧: var iByte : array[0..10] of byte; i : integer; begin abc := 'Delphi'; for i := 0 to legnth(abc)-1 do iByte := ord(abc); end;
应该这样吧: var iByte : array[0..10] of byte; i : integer; begin abc := 'Delphi'; for i := 0 to legnth(abc)-1 do iByte := ord(abc); end;
Y yanhsiaosan Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #7 写入串口不用转换为BYTE BRes:=WriteFile(Hcom, PChar(S_Tran)^, Length(S_Tran), DwCharsWritten, LpolW); //发送数据