StrFloat Function | |
Convert a float expression to a PSZ.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION StrFloat(
flSource AS FLOAT,
dwLength AS DWORD,
dwDecimals AS DWORD
) AS STRING
public static string StrFloat(
Float flSource,
uint dwLength,
uint dwDecimals
)
Request Example
View SourceParameters
- flSource
- Type: Float
The numeric expression to convert. - dwLength
- Type: DWord
The length of the string to return, including decimal digits, decimal point, and sign.
If dwLength is not long enough to hold the entire number,
The result will be in scientific notation.
- dwDecimals
- Type: DWord
The number of decimal places to return.
Return Value
Type:
StringRemarks
StrFloat() is a typed version of the Str() numeric function, except that SetDecimalSep() is ignored. See Str() for a detailed description.
Examples
These examples demonstrate the range of values returned by StrFloat(), depending on the arguments specified:
1LOCAL fNumber AS FLOAT
2fNumber := 123.45
3? StrFloat(fNumber * 10, 7, 2)
4? StrFloat(fNumber * 10, 12, 4)
5? StrFloat(fNumber, 10, 1)
See Also