UInt64 Data Type

Holds unsigned 64-bit (8-byte) integer values in the range 0–18,446,744,073,709,551,615.


Default value
When you declare a variable of type UInt64 and do not initialize it, its default value is zero (0).

If you use the negation operator (-) on an unsigned type, ViviFire gives a warning that this operation is usually an error.

If you subtract a larger number from a smaller number, you find the result as follows:

number Mod UInt64.Max + 1
Automatic conversions
UInt64 widens to Int128, UInt128, Real32, Real64, or Real128 without risk of overflow.
Type characters
UInt64 has no type characters.

Shared methods and properties

UInt64.Default As UInt64
Returns the default value, 0.
UInt64.Max As UInt64
Returns the maximum positive value.
UInt64.Min As UInt64
Returns the minimum value. This is always zero (0)
UInt64.Parse(str As String, Optional #format As Format) As UInt64
Tries to parse a string that shows as an integer.
If #format is not given or is #Null, it tries to parse str as a decimal (base-10) integer. Or you can make it clear with Format.Base10.
UInt64.Size As Int32
Returns the number of available bytes. This is always 8.


Example 1

Dim foo As UInt64

Example 2

Dim low As UInt64 = 0, high As UInt64 = 100
Dim result As UInt64 = low - high
After execution
low0 (%X0000000000000000)
high100 (%X0000000000000064)
result18446744073709551516 (%XFFFFFFFFFFFFFF9C)

See also