Skip to content

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.

Examples

start GeSHi

vb
  Dim bytevar As Byte
  bytevar = 100
  Print "bytevar= ", bytevar

end GeSHi

start GeSHi

vb
Dim x As Byte = CByte(&H80)
Dim y As Byte = CByte(&H7F)
Print "Byte Range = "; x; " to "; y

end GeSHi

Output:

Byte Range = -128 to  127

Dialect Differences

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

Differences from QB

  • New to FreeBASIC

See also

  • Ubyte
  • Cbyte
  • Table with variable types overview, limits and suffixes

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft