Home > lang > cbyte 
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
CByte
Syntax
Byte = CByte ( Expression AS Variant ) AS Byte

Converts an expression into a byte.

Expression is first converted into an integer. Then, if this integer overflows the byte range, it is truncated.

Errors

MessageDescription
Type mismatch (#6) Expression cannot be converted.

Examples

PRINT CByte("17")

17
PRINT CByte(100000)

160
PRINT CByte(TRUE)

255

See also

Conversion Functions