CUInt

Converts numeric or string expression to a KeyPgUintegerUInteger or KeyPgUintegerUInteger<bits>

Syntax
	KeyPgDeclareDeclare KeyPgFunctionFunction CUInt ( KeyPgByvalByVal expression KeyPgAsAs DataTypedatatype ) KeyPgAsAs KeyPgUintegerUInteger
	KeyPgDeclareDeclare KeyPgFunctionFunction CUInt<bits> ( KeyPgByvalByVal expression KeyPgAsAs DataTypedatatype ) KeyPgAsAs KeyPgUintegerUInteger
	<bits>

	KeyPgTypeType typename
		KeyPgDeclareDeclare KeyPgOperatorOperator KeyPgCastCast ( ) KeyPgAsAs KeyPgUintegerUInteger
		KeyPgDeclareDeclare KeyPgOperatorOperator KeyPgCastCast ( ) KeyPgAsAs KeyPgUintegerUInteger<bits>
	End Type

Usage
	result = CUInt( numeric expression )
	result = CUInt( string expression )
	result = CUInt( user defined type )

Parameters
	bits
		A numeric constant expression indicating the size in bits of unsigned 
		integer desired.  The values allowed are 8, 16, 32 or 64.
	expression
		a numeric, string, or pointer expression to cast to a KeyPgUintegerUInteger or 
		KeyPgUintegerUInteger<bits> value
	datatype
		any numeric, string, or pointer data type
	typename
		a user defined type

Return Value
	A KeyPgUintegerUInteger or KeyPgUintegerUInteger<bits> containing the converted value.

Description
	The CUInt function rounds off the decimal part and returns a KeyPgUintegerUInteger 
	value, or if a bits value is supplied, an unsigned integer type of the 
	given size.

	The function does not check for an overflow; for example, for a 32-bit 
	KeyPgUintegerUInteger results are undefined for values which are less than 0 or 
	larger than 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 KeyPgValuintValUInt or KeyPgValulngValULng, depending on the size of the result type.

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

Dialect Differences
	* Not available in the CompilerOptlang-lang qb dialect unless referenced with the 
	  alias __Cuint.

Differences from QB
	* New to FreeBASIC

See also
	* KeyPgCbyteCByte
	* KeyPgCubyteCUByte
	* KeyPgCshortCShort
	* KeyPgCushortCUShort
	* KeyPgCintCInt
	* KeyPgClngCLng
	* KeyPgCulngCULng
	* KeyPgClngintCLngInt
	* KeyPgCulngintCULngInt
	* KeyPgCsngCSng
	* KeyPgCdblCDbl
	* KeyPgUintegerUInteger

