Gambas Documentation
Application Repository
Compilatie & Installatie
Componenten
Developer Documentation
Documenten
Foutboodschappen
Hoe...
Laatste Wijzigingen
Language Overviews
LeesMij
Lexicon
Taal Index
Array Declaratie
BREAK
Choose
CONTINUE
DEC
DO
END WITH
Exist
FOR
FOR EACH
GOTO
INC
LOOP
NEXT
OPEN
QUIT
REPEAT
RETURN
STATIC
STOP
TRUE
UNTIL
WEND
WHILE
WITH
ar
ca
cs
de
en
eo
es
fa
fr
hu
id
it
ja
ko
mk
nl
pl
pt
pt_BR
ru
sq
tr
vi
zh
zh_TW
CByte
Byte
= CByte (
Expression
AS Variant
)
AS Byte
Converts an expression into a byte.
Sinds 3.18
If the conversion overflows, an error is raised, unless
System.IgnoreOverflow
is set.
Errors
Message
Description
Type mismatch (6)
Expression
cannot be converted.
Overflow (7)
The conversion leads to a number that does not fit the range of
Byte
numbers.
Examples
PRINT
CByte
(
"17"
)
17
PRINT
CByte
(
100000
)
160
PRINT
CByte
(
TRUE
)
255
See also
Conversion Functions