lang • cbyte

CByte

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

Message

Description
Type mismatch (6) Expression cannot be converted.

Examples

Print CByte("17")
17
Print CByte(100000)
160
Print CByte(True)
255

See also