Skip to main content

UInt64

UInt64

Example

procedure AddUnsigned(Delta: UInt64; var Total: UInt64);
begin
Total := Total + Delta;
end;

Usage

UInt64 stores a fixed unsigned 64-bit integer from zero through 18,446,744,073,709,551,615.

Additional Technical Info

UInt64 is PascalScript base type btU64: a fixed unsigned 64-bit integer with range 0..18,446,744,073,709,551,615 on both Win32 and Win64 Velox.

The upper half does not fit signed Int64. Many Variants, databases, JSON libraries and external languages have no lossless unsigned 64-bit type. Validate the target and use a canonical decimal String when necessary.

JavaScript binary64 numbers preserve consecutive integers only through 2^53 - 1, far below UInt64's maximum. Never send a large UInt64 as an ordinary JSON number when exact identity matters.

Use UInt64 only for explicitly unsigned 64-bit contracts. Do not substitute NativeUInt, whose width changes with executable architecture. Validate before arithmetic because underflow below zero and overflow above the maximum are outside the contract.

The example is source-reviewed only; no arithmetic was executed.

External references

Created 2026-07-15