CULngInt
Converts numeric or string expression to 64-bit unsigned integer (`ULongInt`)
Syntax
`
Declare Function CULngInt ( ByVal expression As datatype ) As ULongInt
Type typename
Declare Operator Cast ( ) As ULongInt
End Type
`
Usage
`
result = CULngInt( numeric expression )
result = CULngInt( string expression )
result = CULngInt( user defined type )
`
Parameters
`expression`
a numeric, string, or pointer expression to cast to a `ULongInt` value
`datatype`
any numeric, string, or pointer data type
`typename`
a user defined type
Return Value
A `ULongInt` value.
Description
The `CULngInt` function rounds off the decimal part and returns a 64 bit `ULongInt` value. The function does not check for an overflow, so be sure not to pas a value thats less/larger than 0 to 18 446 744 073 709 551 615. The name can be explained as 'Convert to Unsigned LoNG INTeger'.
If the argument is a string expression, it is converted to numeric by using `ValULng`.
Example
`
' Using the CLNGINT function to convert a numeric value
'Create an UNSIGNED LONG INTEGER variable
Dim numeric_value As ULongInt
'Convert a numeric value
numeric_value = CULngInt(12345678.123)
'Print the result, should return 12345678
Print numeric_value
Sleep
`
Dialect Differences

- Not available in the -lang qb dialect unless referenced with the alias `__Culngint`.

Differences from QB

- New to FreeBASIC

See also

- `CByte`
- `CUByte`
- `CShort`
- `CUShort`
- `CInt`
- `CUInt`
- `CLng`
- `CULng`
- `CLngInt`
- `CSng`
- `CDbl`