BYTE
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgByte
- Last revised: 2021-12-13
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= ", bytevarend GeSHi
start GeSHi
vb
Dim x As Byte = CByte(&H80)
Dim y As Byte = CByte(&H7F)
Print "Byte Range = "; x; " to "; yend GeSHi
Output:
Byte Range = -128 to 127Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias
__Byte.
Differences from QB
- New to FreeBASIC
See also
UbyteCbyteTable with variable types overview, limits and suffixes
Back to DocToc