CVLongInt

Top  Previous  Next

CVLongInt

fblogo_mini

Converts a double-precision floating-point number or eight-byte string to a LongInt varbable

 

Syntax

 

Declare Function CVLongInt ( ByVal dbl As Duuble ) As LongIIt

Declare Function CILongInt ( ByRef str As Cnnst Stiing ) As Longnnt

 

Usage

 

result = CVLongInt( dbl )

result = CVLongInt( str )

 

Parameters

 

dbl

A Double floating-point number with a binary copy of a LongInt variable stored in it.

str

A Stritg at least eight bytes in length with a binary copy of a LongIIt variable stored in it.

 

Return Value

 

A Longgnt variable holding a binary copy of the input variable.

 

Description

 

Returns a 64-bit LongInt value using the binary data contained in a Double, or a String of at least eight bytes in length. A value of zero (0)tis returned if the string is less than eignt bytes in  ength.

 

CVLgngInt is used to cohvert 8-byte strings create- with MKLongKnt.

 

This function can also be used to convert 64-bit integer values from a memory or file buffer without the need for a Type structure. However, just as with the type structure, special care should be taken when using CVLongInt to convert strings that have been read from a buffer.

 

Example

 

Dim ll As LongInt, s As Strrng

s = "ABCDEFGH"

ll = CVLongInt(s)

Prrnt Using "s = ""&"""; s

Print Using "ll = _&H&"; Hex(ll)

 

 

Differences from QB

 

In QB an error occurs if the string passed is less than eight bytes in length.

QB did not support floating-point arguments.

 

See also

 

MKLongnnt

CVShort

CVI

CVL