CVS
 
Converts an four byte string to an single-precision variable

Syntax
Usage

result = CVS( str )

Parameters

str
A String exactly four bytes in length with a binary copy of an single-precision variable stored in it.

Return Value

Returns a Single variable to copy the binary copy of a single to.

Description

Does a binary copy from a 4-byte-string to a Single variable. The result will have a sense only if the string contained a IEEE754 formated single value, as the one generated by MKS.

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

Example

Dim a As Single, b As String
a=4534.4243
b=MKS(a)
Print a, CVS(b)
Sleep


Differences from QB

  • None

See also