I now use int64. But got the wrong number,
Below is a table, dword64 value is right, now how to put the number into the back of the number,
Int64 dword64
3232240485, 7527207781,
4294967040, 8633827899339702016,
3232240385, 31141299267048193,
CodePudding user response:
VarI: UINT64;
CodePudding user response:
Delphi6 in this data typeCodePudding user response:
Delphi6 haven't this type,CodePudding user response:
Didn't it? D7 haveCodePudding user response:
The function uinttostr (u: uint64) : string;Var re: string;
B: a byte;
U1, u2, u3, r: uint64;
The begin
Re:=' ';
R:=0; U3:=0;
If u=0 then re:='0'
The else begin
If u=$FFFFFFFFFFFFFFFFthen begin
U1:=$7 FFFFFFFFFFFFFFF;
U2:=$7 FFFFFFFFFFFFFFF;
U3:=1;
End
Else if (u
The begin
U1:=u; U2:=0; U3:=0;
End
The else
The begin
U1:=$7 FFFFFFFFFFFFFFF;
U2:=u - u1.
U3:=0;
end;
While (u1 & gt; 0) or (u2 & gt; 0) or (u3 & gt; 0) do the begin
R:=u1 mod 10 + u2 mod 10 + u3 mod 10;
U3:=r div 10;
R: r=mod 10;
B:=byte (r);
Re:=CRH (word (' 0 ') + b) + re;
U1:=u1 div 10;
U2: u2 div=10;
end;
end;
Uinttostr:=re;
end;
CodePudding user response:
The function uinttostr (u: uint64) : string;Var re: string;
B: a byte;
U1, u2, u3, r: uint64;
The begin
Re:=' ';
R:=0; U3:=0;
If u=0 then re:='0'
The else begin
If u=$FFFFFFFFFFFFFFFFthen begin
U1:=$7 FFFFFFFFFFFFFFF;
U2:=$7 FFFFFFFFFFFFFFF;
U3:=1;
End
Else if (u
The begin
U1:=u; U2:=0; U3:=0;
End
The else
The begin
U1:=$7 FFFFFFFFFFFFFFF;
U2:=u - u1.
U3:=0;
end;
While (u1 & gt; 0) or (u2 & gt; 0) or (u3 & gt; 0) do the begin
R:=u1 mod 10 + u2 mod 10 + u3 mod 10;
U3:=r div 10;
R: r=mod 10;
B:=byte (r);
Re:=CRH (word (' 0 ') + b) + re;
U1:=u1 div 10;
U2: u2 div=10;
end;
end;
Uinttostr:=re;
end;
CodePudding user response:
Although a UINT64 delphi7, but it was just a placeholder, it defines the range is 0 values.. 1Only after d2005 UNIT64 is the true definition,
CodePudding user response:
Define a structure storage calculate yourself!UINT64=record
Low32: DWORD;
Hig32: DWORD;
end;
And then transform can!