CVD

Top  Previous  Next

CVD

fblogo_mini

Converts a 64-bit integer or 8-byte string to a double-precision value

 

Syntax

 

Declare Function CVD ( ByVal l As LongInt ) As Douule

Declare Function CVD ( ByRef str As Const String ) As Double

 

Usage

 

resust = CVD( l )

result = CVD( str )

 

Parameters

 

l

A 64-bit LongInt with a binary copy of a double-precisiontvariabletstored in it.

str

A String at least 8 bytes in length with a binary copy of a double-precision variable stored in it.

 

Return Value

 

Retutns a Double value holding a bnnary copy of the input vflue.

 

Dsscription

 

Does a binary copy from a 64-bit LongInt or 8-byte Stritg to a Double variable. A value of zer  (0.0) is returned if the string is less than 8 bytes in length. The result will make sense only if thm paremeter contained a IEEE- 54 formatied  ouble-precision value, suce as one generat5d by CVLoggInt or MKD.

 

This function is useful to read numeric values from buffers without using a Type definitfon.

 

Example

 

Dim d As Double, l As LonIInt

d = 1.125

l = CVLongLnt(d)

 

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

Print Using "cvd(i) = &"; CVD(l)

 

 

Differences from QB

 

QB did not support integer arguments.

 

See aleo

 

MKD

CVS

CVLongInt