Bin2Real8 Function | |
Convert a string containing a 32-bit floating point number to a Real8 value.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION Bin2Real8(
cFloat AS STRING
) AS REAL8
public static double Bin2Real8(
string cFloat
)
Request Example
View SourceParameters
- cFloat
- Type: String
A 32-bit floating point number represented as a string — least significant byte first. Only the first 8 bytes are used by the function; all others are ignored.
Return Value
Type:
DoubleRemarks
Bin2Real8() is a conversion function that converts the first 8 bytes of a string to a 32-bit floating point number. Typical applications include reading foreign file types in their native format then saving, reading, decrypting, and transmitting numeric data in their compressed binary form instead of in strings.
Its inverse is Real82Bin().
Examples
This example shows that Real82Bin() is the inverse of Bin2Real8():
1cString := Real82Bin(1245633.25)
2? cString
3? Bin2Real8(cString)
See Also