gpt4 book ai didi

delphi - 十六进制到十进制转换器 (ESN Algo)

转载 作者:行者123 更新时间:2023-12-02 15:38:25 26 4
gpt4 key购买 nike

如何进行像本页这样的转换? http://www.esnconverter.com/index.php?esn=88888888

我尝试这样做,但结果是错误的

procedure TForm1.btn1Click(sender: TObject);
begin
memo1.Lines.Add (IntToStr(StrToInt('$'+Edit1.text)));
end;

最佳答案

根据Wikipedia

For the decimal format the first three digits are the decimal representation of the first 8 bits (between 000 and 255 inclusive) and the next 8 digits are derived from the remaining 24 bits and will be between 00000000 and 16777215 inclusive

Memo1.Lines.Add( Format('%.3d%.8d',
[StrToInt(('$' + Copy(Edit1.Text, 1, 2))),
StrToInt(('$' + Copy(Edit1.Text, 3, 6)))]));

上面给出了与该页面相同的输出,但是,我对 ESN 一无所知。

关于delphi - 十六进制到十进制转换器 (ESN Algo),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20621856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com