Re: 64 bit data types
- From: "Xavier Ind." <no@xxxxxxxx>
- Date: Mon, 30 Jan 2006 20:50:50 +0000
Kristofer Skaug wrote:
Florent Ouchet wrote:Cardinal (64 bit signed)64 bit unsigned
Speaking of which, what's the deal with the 'hidden' UInt64 type in Delphi, anyway?
Last time I checked (D2005 trial, IIRC) it didn't behave much like a real unsigned 64-bit int.
Well, it's mostly usable, I'd say. IntToStr() will still consider the integer as signed, but... it's getting there. <g>
There has been at least one improvement with BDS2006 update 1; the following code now doesn't compile:
var Big: UInt64; ... Big := $FFFFFFFFFFFFFFF0; Writeln(IntToHex(Big, 16));
How is that an improvement, you ask? When it did, the output was 00000000FFFFFFF0 (ouch). The old workaround is still valid:
function IntToHex(const BigInt: UInt64; const Digits: Integer): string; overload; inline;
begin
Result := IntToHex(Int64(BigInt), Digits);
end;
.
- Follow-Ups:
- Re: 64 bit data types
- From: Kristofer Skaug
- Re: 64 bit data types
- References:
- 64 bit data types
- From: Florent Ouchet
- Re: 64 bit data types
- From: Florent Ouchet
- Re: 64 bit data types
- From: Kristofer Skaug
- 64 bit data types
- Prev by Date: Re: Router port blocking
- Next by Date: Re: What Borland should stop wasting their time on
- Previous by thread: Re: 64 bit data types
- Next by thread: Re: 64 bit data types
- Index(es):