Skip to content

Uinteger

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Bit Manipulation › UInteger

UInteger

Standard data type: 32-bit or 64-bit unsigned, same size as SizeOf(Any Ptr). Equivalent to Unsigned Integer.

Syntax

Dim variable As UInteger
Dim variable As UInteger<bits>

Parameters

  • bits

Description

32-bit or 64-bit unsigned whole-number data type, depending on the platform.

If an explicit bit size is given, a data type is provided that can hold values from 0 up to (1ULL Shl (bits)) - 1. The selected data type is UByte for UInteger<8>, UShort for UInteger<16>, ULong for UInteger<32> and ULongInt for UInteger<64>.

Remarks

Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Uinteger.

Differences from QB

  • New to FreeBASIC

See also

Examples

#ifdef __FB_64BIT__

    Dim x As UInteger = 0

    Dim y As UInteger = &HFFFFFFFFFFFFFFFF

    Print "UInteger Range = "; x; " to "; y

#else

    Dim x As UInteger = 0

    Dim y As UInteger = &HFFFFFFFF

    Print "UInteger Range = "; x; " to "; y

#endif

Category: Bit Manipulation
Kind: keyword


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally