摘要:var S:String; P:PChar; B:array of Byte;begin S:='Hello'; SetLength(B,Length(S)+1); P:=PChar(S); CopyMemory(B,P,Length(S)+1); ShowMessage(Char(B[0]));e
        阅读全文
        
            posted @ 2016-05-18 15:01
| 
 | ||
| 随笔分类 - Delphi 字节转化用法
摘要:var S:String; P:PChar; B:array of Byte;begin S:='Hello'; SetLength(B,Length(S)+1); P:=PChar(S); CopyMemory(B,P,Length(S)+1); ShowMessage(Char(B[0]));e
        阅读全文
 
            posted @ 2016-05-18 15:01 
摘要:整形不能超过256 b:=Byte(StrToInt(n)); var s: string; b: Byte; begin s := Edit1.Text; b := Byte(StrToInt(s)); end;
        阅读全文
 
            posted @ 2016-05-18 13:40 
摘要:FillChar(aryTest[Low(aryTest)], Length(aryTest) * SizeOf(aryTest[Low(aryTest)]), 0);
        阅读全文
 
            posted @ 2016-05-17 17:39 
摘要:有4个字节类型的值,用移位或逻辑运算符怎么合成一个整数?比如 $FFEEDDCC。高$FF$EE$DD$CC低
        阅读全文
 
            posted @ 2016-05-17 16:07 
摘要:var s:string; len:Integer; AData:TBytes; begin s:=IntToHex(149259,6);//返回6位字符串 len := length(s) div 2; Setlength(AData,len); HextoBin(pchar(s),@AData[
        阅读全文
 
            posted @ 2016-05-17 16:05 
摘要:inttohexfrom delphi help:Returns the hex representation of an integer.UnitSysUtilsCategorynumeric formatting routinesDelphi syntax:function IntToHex(V
        阅读全文
 
            posted @ 2016-05-11 13:21 
 | ||