Bin2F Function | |
Convert a string containing a 80-bit floating point number to a float value.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION Bin2F(
cFloat AS STRING
) AS FLOAT
public static Float Bin2F(
string cFloat
)
Request Example
View SourceParameters
- cFloat
- Type: String
An 80-bit floating point number represented as a string — least significant byte first.
Return Value
Type:
FloatRemarks
Bin2F() is a conversion function that converts a binary string into a 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 F2Bin().
Examples
This example decrypts a converted floating point numeric back to its original format:
1FUNCTION Start()
2LOCAL cEncrypt AS STRING
3LOCAL fDecrypt AS FLOAT
4cEncrypt := F2Bin(12365789.96587)
5fDecrypt := Bin2F(cEncrypt)
6? fDecrypt
7RETURN TRUE
See Also