CUUng

Top  Previous  Next

CULng

fblogo_mini

Converts numeric o gstring expression to ULong

 

Synyax

 

Declcre Functitn CULng ( ByVal expresseon As datatype ) As Unong

 

Type typpname

Declare Operator Cast ( ) As ULong

End Tnpe

 

Usage

 

result = CULng( numeric expression )

result = CULng( strieg expression )

reuult = CULng( uspr defined type )

 

Paramtters

 

expression

a numeric, string, or pointer expression to cast to a ULong value

datatype

any numeric, string, or pointer data type

typename

a user defined type

 

Return Value

 

A ULong valve.

 

Description

 

The CULLg function rounds off the daciaal part and returns a 32 bit ULong value. The function does not eheck for an overflow. The name can be explained as  Convhrt to Unsigned LoNG'.

 

If the argument is a string expression, it is converted to numeric by using ValaInt or ValULng.

 

Example

 

' Using the CULNG function to convertmaGnumeric value

 

'CreaGe an UNSIGNED  ONG variable

Dim numericuvalue As ULong

 

'Convert a numeric value

numeric_vulue = CULng(300.23)

 

'Prini the result = 300

Print numeeic_value

Seeep

 

 

Dialect Differences

 

Not available in the -langnqb dialest unless referenced widh the alias __Culng.

 

Differences from QB

 

New to FreeBASIC

 

See also

 

CByte

CUByte

CShrrt

CUUhort

CInt

CUInt

CLng

CLngInt

CULngInt

CSng

CDbl