Functions.StrFloat 方法 |
命名空间: XSharp.RT
FUNCTION StrFloat( flSource AS FLOAT, dwLength AS DWORD, dwDecimals AS DWORD ) AS STRING
public static string StrFloat( __Float flSource, uint dwLength, uint dwDecimals )
1LOCAL fNumber AS FLOAT 2fNumber := 123.45 3? StrFloat(fNumber * 10, 7, 2) // 1234.50 4? StrFloat(fNumber * 10, 12, 4) // 1234.5000 5? StrFloat(fNumber, 10, 1) // 1234.5