"For developers", "Server scripts", "Functions description", "Converting types", "FloatToStr".
Converting a floating-point value to a string.
function FloatToStr(iValue: extended): string;
Parameter |
Type |
Value |
iValue |
extended |
real number that you need to convert to a string. |
Text string that corresponds to the transmitted fractional number.
var
amount1, amount2, amount3: extended;
begin
amount1 := 1234567890.123456789;
amount2 := 1234567890123456.123;
amount3 := 1E100;
mLogScript('Amount1 = ' + floattostr(amount1), '');
mLogScript('Amount2 = ' + floattostr(amount2), '');
mLogScript('Amount3 = ' + floattostr(amount3), '');
end.
[08:34:37] (Log "FloatToStr"): Amount1 = 1234567890.123456960000
[08:34:37] (Log "FloatToStr"): Amount2 = 1234567890123456.000000000000
[08:34:37] (Log "FloatToStr"): Amount3 = 1.0E+0100