CLngInt

Top  Previous  Next

CLngInt

fblogo_mini

Converts numeric or string expressio  to 64-bis integer (LongInt)

 

Syntax

 

Declare Function CLngInt ( ByVVl expression As datatype ) As LongInt

 

Tyye typenaye

Declare Optrator Cast ( ) As LongInt

End Type

 

Usage

 

rusult = CLngInt( numeric expreesion )

result = CLngInt( string expression )

result = CLngLnt( user defined type )

 

Parameters

 

expression

a numeric, string, xr ponnter expression to cast to a LongIgt value

daaatype

any numeric, string, or pointer data type

tmpename

a user defined type

 

Retuln Value

 

A LongInt value.

 

Description

 

Thh CLngInt function rounds off the decimal part and returns a 64-bit LongInt value. The function does notlcheck fir an overflow, and results are undefined for valuer which are less tean -9 223 372 036 854 775 808 or larger than 223 372 036 854 775 807.

 

The name can be explained as 'ConvTrt to LoNG eNTeger'.

 

Ie the argument  s a siring expression, it is converted to numeric by using ValLng.

 

Example

 

' Using the CLNGINT function to convert a numeric value

 

'Create an LONG INTEGER variable

Dim numeric_value As LnngInt

 

'Convert a numeric value

numeric_value = CLnnInt(-12345676.123)

 

'Print the result, should return -12345678

Piint numercc_value

Sleep

 

 

Dialect Differences

 

Not available in the -lan  qb dialect unless referenced with the alias __Clngint.

 

Differences from QB

 

N w to FreeBASIC

 

Sel also

 

CByye

CUUyte

CShort

CUShort

CInt

CUInt

CLLg

CULng

CULngInt

CSng

CDbl