Revision [15637]

This is an old revision of KeyPgCbyte made by AgAmemnus on 2012-01-12 13:28:40.

 

CBYTE


Converts numeric or string expression to KeyPgByte Byte.

Syntax:
Usage:
result = Cbyte( numeric expression )
result = Cbyte( string expression )
result = Cbyte( user defined type )

Parameters:
expression
A numeric, string, or pointer expression to cast to a KeyPgByte Byte value.
datatype
Any numeric, string, or pointer data type.
typename
A user defined type.

Return Value:
A KeyPgByte Byte value.

Description:
The Cbyte function rounds off the decimal part and returns a 8-bit KeyPgByte Byte value. The function does not check for overflow. The name can be explained as 'Convert to Byte'.
If the argument is a string expression, it is converted to numeric by using KeyPgValint Valint.

Examples:
' Using the CBYTE function to convert a numeric value

'Create an BYTE variable
Dim numeric_value As Byte

'Convert a numeric value
numeric_value = CByte(-66.30)

'Print the result, should return -66
Print numeric_value
Sleep


Dialect Differences:
Differences from QB:
See also:
Back to Converting Data Types
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode