From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Used to store unsigned 64-bit integer values. The default value is 0. Generally you will use the Integer data type (equivalent to Int32 on 32-bit apps or Int64 on 64-bit apps) or UInteger (equivalent to UInt32 on 32-bit apps or UInt64 on 64-bit apps). This size-specific integer data type is available for use with external OS APIs.
UInt64 values can range from 0 to 2^64-1 (18,446,744,073,709,551,615) and use 8 bytes.
Comparing a UInt64 to a Literal or Constant
The type of a numeric literal or constant that is a whole number is the same integer type as the architecture of the platform for which you are building. That means that if you are building for 64 bit, literals and constants will be 64 bit (signed) integers.
Therefore to correctly compare them, use CType to cast the literal to a UInt64.
In this example the variable Distance is a UInt64: