1

Several questions and answers (e.g. here and here) mention that in Delphi 7 the type UInt64 exists, but contrary to what the name suggests it is a signed 64-bit integer.

What is the minimum version of Delphi that supports actual properly unsigned 64-bit integers natively?

2 Answers 2

1

A true unsigned UInt64 type was first supported in Delphi 2007.

QC#1210

4
  • UInt64 exists as a distinct type in D2006. Mar 17, 2016 at 21:56
  • Well, that report was opened for D6 and closed for D2007. I have the RTL source code for D2006 and can see code in the System unit related to a distinct UInt64 data type. And, as the QC report mentions: "Just a note that Delphi 7 includes an undocumented UInt64 data type that appears to be partially functional. Danny Thorpe has mentioned that not all operators may work with this data type-- hopefully this is addressed in either a patch for D7 or D8." So it was a work-in-progress for awhile. D2007 is probably when UInt64 was finalized, but is certainly not when it was first added. Mar 17, 2016 at 22:16
  • 2
    I think the question is about when the type actually first behaved correctly, when it was finalized Mar 17, 2016 at 22:34
  • @RemyLebeau: I pointed that out already in my question (that it exists as of Delphi 7). And my question was decidedly about starting when it behaved properly as unsigned 64-bit integer. Also wonder what partially functional is supposed to mean. That it works for half of the range that should be supported by unsigned 64-bit integers? ;o) Mar 18, 2016 at 9:08
-1

As it is stated in documentation:

Pre XE4

type UInt64 = Int64;

XE4

type UInt64 = { built-in type };
7
  • D2007 did have native support. Also documented. Mar 17, 2016 at 20:54
  • @dustypup: would it be possible to link to the documentation that you're referring to? Also the documentation is kind of a stretch, since I do not own XE4 and I am asking precisely because I do not have access to all old and latest versions. Mar 17, 2016 at 20:57
  • 2
    Documentation is irrelevant here. Or do you want to know at which version the documentation was corrected? I rather imagine that you actually care about which version the compiler was correct. Litmus test is what this program outputs: {$APPTYPE CONSOLE} begin Writeln(low(UInt64)); Writeln(high(UInt64)); end. Mar 17, 2016 at 20:58
  • @DavidHeffernan: yep, I care about actual behavior, not purely documentation. Mar 17, 2016 at 21:00
  • Do you not have old delphi versions. I never had anything between D7 and D2010 so I can't check for you. Mar 17, 2016 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.