UInt128
Data Type
Holds unsigned 128-bit (16-byte) integer values in the range 0–340,282,366,920,938,463,463,374,607,431,768,211,455.
Instructions
- Default value
- When you declare a variable of type
UInt128
and do not initialize it, its default value is zero (0). - Negation
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 UInt128.Max + 1
- Automatic conversions
UInt128
widens toReal32
,Real64
, orReal128
without risk of overflow.- Type characters
UInt128
has no type characters.
Shared methods and properties
UInt128.Default As UInt128
- Returns the default value,
0
. UInt128.Max As UInt128
- Returns the maximum positive value.
UInt128.Min As UInt128
- Returns the minimum value. This is always zero (0)
UInt128.Parse(str As String, Optional #format As Format) As UInt128
- Tries to parse a string that shows as an integer.
- If
#fnt
is not given or is#Null
, it tries to parsestr
as a decimal (base-10) integer. Or you can make it clear withFormat.Base10
. UInt128.Size As Int32
- Returns the number of available bytes. This is always 16.
Examples
Example 1
Dim foo As UInt128
Example 2
Dim low As UInt64 = 0, high As UInt64 = 100
Dim result As UInt64 = low - high
Variable | Value |
---|---|
low | 0 (%X00000000000000000000000000000000) |
high | 100 (%X00000000000000000000000000000064) |
result | 340282366920938463463374607431768211356 (%XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C) |