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

Home › Standard Data Types › UByte

UByte

Standard data type: 8 bit unsigned. Equivalent to Unsigned Byte.

Syntax

Dim variable As UByte

Description

8-bit unsigned whole-number data type. Can hold a value in the range of 0 to 255.

Remarks

Dialect Differences

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

Differences from QB

  • New to FreeBASIC

See also

Examples

Dim ubytevar As UByte

ubytevar = 200

Print "ubytevar= ", ubytevar
Dim x As UByte = 0

  Dim y As UByte = &HFF

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

Output:

UByte Range = 0 to 255

Category: Standard Data Types
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