Y yzhshi Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #3 十六进制数据可以直接在十进制之间使用。 $0A就等于10了
Y yzhshi Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #4 简单例子 procedure TForm1.Button1Click(Sender: TObject); var HexStr: string; OrdInt: Integer; begin HexStr := '0A'; OrdInt := StrToInt('0X' + HexStr); ShowMessage(IntToStr(OrdInt)); OrdInt := 20; HexStr := IntToHex(OrdInt, 2); ShowMessage(HexStr); end;
简单例子 procedure TForm1.Button1Click(Sender: TObject); var HexStr: string; OrdInt: Integer; begin HexStr := '0A'; OrdInt := StrToInt('0X' + HexStr); ShowMessage(IntToStr(OrdInt)); OrdInt := 20; HexStr := IntToHex(OrdInt, 2); ShowMessage(HexStr); end;
小 小菜鸟 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #5 请问? edit1.text:='$0A'是不是在edit1上显示10呢??
卷 卷起千堆雪tyn Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #6 16--->10 Edit1.Text:=Format('%d',[StrtoInt('$'+'A')]);
Y yzhshi Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #7 你要显示出来? 使用 Edit1.Text:=IntToHex(10,2)实验一下。
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #8 10->16 hexstring:=format('%0x',value); 16->10 s:='$'+hexstring; value:=strtoint(s);
D dcsdcs Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #9 >>edit1.text:='$0A'是不是在edit1上显示10呢?? 显示的是$0A! 大家都说得很清楚了!
Y yangxiangjun Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #10 edit1.text:=inttostr($0A),为显示10我试了好使
C coolbaby Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-09 #11 edit1.text:='$0A'就是显示$0A edit1.text:=inttostr($0A)就是edit1.text:=inttostr(10) 明白了么