Home > Back-end >  Delphi hexadecimal converted to decimal problem!!!!!
Delphi hexadecimal converted to decimal problem!!!!!

Time:10-19

How to convert hexadecimal FFFFFFFFFFFFFFFF to decimal, calculator conversion result is 18446744073709551615

I don't know how to convert to Delphi, as if the number is too big, who is the boss teach me


D: int64;
The begin
Pint64 (@ d) ^ :=StrToInt64 (' $' + 'FFFFFFFFFFFFFFFF');
Showmessage (floattostr (d))
end;
The final result is wrong, has a symbol

CodePudding user response:

Int64 also not fit, int64 scope: - 9223372036854775808 ~ 9223372036854775807

CodePudding user response:

According to the basic way to come, converted to string processing,

Baidu "multiplication of large Numbers",

CodePudding user response:

Are there any symbols, 64,

CodePudding user response:

An unsigned 64 - bit: QWORD

CodePudding user response:

//uint64 Delphi to require high support, and how high version don't know, anyway d7 does not support, uinttoStr also,
 
Var
D: uint64;
The begin
Dd:=strtoint64 (' $FFFFFFFFFFFFFFFF ');
Showmessage (uinttoStr (d)));
  • Related