Converts numeric or string expression to an unsigned integer (
UInteger)
Syntax
Usage
result = CUInt( numeric expression )
result = CUInt( string expression )
result = CUInt( user defined type )
Parameters
expression
a numeric, string, or pointer expression to cast to a
UInteger value
datatype
any numeric, string, or pointer data type
typename
a user defined type
Return Value
Description
The
CUInt function rounds off the decimal part and returns a 32 bit
UInteger value. The function does not check for an overflow, so be sure not to pas a value thats less/larger then 0 to 4 294 967 296. The name can be explained as 'Convert to Unsigned INTeger'.
If the argument is a string expression, it is converted to numeric by using
ValUInt.
Example
' Using the CUINT function to convert a numeric value
'Create an UNSIGNED INTEGER variable
Dim numeric_value As UInteger
'Convert a numeric value
numeric_value = CUInt(300.23)
'Print the result = 300
Print numeric_value
Sleep
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias __Cuint.
Differences from QB
See also