UInt32 Data Type

Holds unsigned 32-bit (4-byte) integer values in the range 0–4,294,967,295.

Instructions

Default value
When you declare a variable of type UInt32 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 UInt32.Max + 1
Automatic conversions
UInt32 widens to Int64, UInt64, Int128, UInt128, Real32, Real64, or Real128 without risk of overflow.
Type characters
You can put the suffix u32 (or U32) on the end of an integer literal. But there are no type characters for names.

Shared methods and properties

UInt32.Default As UInt32
Returns the default value, 0.
UInt32.Max As UInt32
Returns the maximum positive value.
UInt32.Min As UInt32
Returns the minimum value. This is always zero (0)
UInt32.Parse(str As String, Optional #format As Format) As UInt32
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.
UInt32.Size As Int32
Returns the number of available bytes. This is always 4.

Examples

Example 1

Dim foo As UInt32

Example 2

Dim low As UInt32 = 0, high As UInt32 = 100
Dim result As Uint32 = low - high
After run
VariableValue
low0 (%X00000000)
high100 (%X00000064)
result4294967196 (%XFFFFFF9C)

See also