From Clomosy Docs

Revision as of 10:08, 8 October 2024 by ClomosyManager (talk | contribs)

The FloatToStr function converts a floating point number Value into a displayable string. The value is displayed to 15 digits of precision. The Value type may be any of the floating point types.

Example
TRObject Syntax

 var
   LongNumberValue, ShortNumberValue : float;
 
 {
   LongNumberValue = 1234567890.123456789;
   ShortNumberValue = 123.12;
 
   ShowMessage('LongNumberValue = '+FloatToStr(LongNumberValue));
   ShowMessage('ShortNumberValue = '+FloatToStr(ShortNumberValue));
 }

Base Syntax

 var
   LongNumberValue, ShortNumberValue : float;
 
 begin
   LongNumberValue := 1234567890.123456789;
   ShortNumberValue := 123.12;
 
   ShowMessage('LongNumberValue = '+FloatToStr(LongNumberValue));
   ShowMessage('ShortNumberValue = '+FloatToStr(ShortNumberValue));
 end;

Output:

See Also