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

Home › Standard Data Types › Byte

Byte

Standard data type: 8 bit signed

Syntax

Dim variable As Byte

Description

8-bit signed whole-number data type. Can hold a value in the range of -128 to 127.

Remarks

Dialect Differences

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

Differences from QB

  • New to FreeBASIC

See also

Examples

Dim bytevar As Byte

  bytevar = 100

  Print "bytevar= ", bytevar
Dim x As Byte = CByte(&H80)

Dim y As Byte = CByte(&H7F)

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

Output:

Byte Range = -128 to  127

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