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

ULong 〔BlitzLLVM〕

ULong(value)
ULong:UInt64(value)

Returns: The ULong.

Description

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

Converts a number or a text to a ULong, a 64-bit integer from 0 to 18446744073709551615. This is a BlitzLLVM extension: the originals only know Int and Float. A whole number below 0 keeps its lowest 64 bits (ULong(-1) is 18446744073709551615), a real is rounded to the nearest whole number (halves go to the even one) and stops at 0 or the largest number if it is outside. Use SatULong to stop whole numbers below 0 at 0 as well. A ULong is compared, divided and shifted right without a sign, and Abs and Sgn see it as never negative.

Differences

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

Examples

Print ULong(-1)
Print ULong(3000000000.0)
Print ULong(-1) Shr 60
Print Min(ULong(-1), ULong(5))
18446744073709551615
3000000000
15
5

Related Commands

Long 〔BlitzLLVM〕, UByte 〔BlitzLLVM〕, UInt 〔BlitzLLVM〕, UShort 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally