CLng

Converts numeric or string expression to KeyPgLongLong

Syntax
	KeyPgDeclareDeclare KeyPgFunctionFunction CLng ( KeyPgByvalByVal expression KeyPgAsAs DataTypedatatype ) KeyPgAsAs KeyPgLongLong

	KeyPgTypeType typename
		KeyPgDeclareDeclare KeyPgOperatorOperator KeyPgCastCast ( ) KeyPgAsAs KeyPgLongLong
	End Type

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

Parameters
	expression
		a numeric, string, or pointer expression to cast to a KeyPgLongLong value
	datatype
		any numeric, string, or pointer data type
	typename
		a user defined type

Return Value
	A KeyPgLongLong value.

Description
	The CLng function rounds off the decimal part and returns a 32-bit KeyPgLongLong 
	value.  The function does not check for an overflow, and results are 
	undefined for values which are less than -2 147 483 648 or larger than 2 
	147 483 647.

	The name can be explained as 'Convert to LoNG'.

	If the argument is a string expression, it is converted to numeric by 
	using KeyPgValintValInt.

Example

	' Using the CLNG function to convert a numeric value

	'Create an LONG variable
	Dim numeric_value As Long

	'Convert a numeric value
	numeric_value = CLng(-300.23)

	'Print the result, should return -300
	Print numeric_value
	Sleep

Differences from QB
	* The string argument was not allowed in QB

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

