Skip to content
Narta Xaymar Dirks edited this page Nov 1, 2026 · 8 revisions
BlitzLLVM

UInt 〔BlitzLLVM〕

UInt(value)
UInt:UInt32(value)

Returns: The UInt.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Converts a number or a text to a UInt, a 32-bit integer from 0 to 4294967295. This is a BlitzLLVM extension: the originals only know Int and Float. A whole number below 0 or above the limit keeps its lowest 32 bits (UInt(-1) is 4294967295), a real is rounded to the nearest whole number (halves go to the even one) and stops at 0 or 4294967295 if it is outside. Use SatUInt to stop whole numbers at the limits as well. Int converts back, which makes 4294967295 a -1 again.

Differences

  • Not in the originals, which have no integers of other sizes.

Examples

Print UInt(-1)
Print UInt(5000000000.0)
Print Int(UInt(-1))
4294967295
4294967295
-1

Related Commands

Int, UByte 〔BlitzLLVM〕, ULong 〔BlitzLLVM〕, UShort 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally