Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to convert negative floating-point numbers into characters in delphi, hurry up! ! !
How to convert negative floating-point numbers into characters in delphi, hurry up! ! !
Use this function

Function FormatFloat(const format: stringValue: Extended): string; Overload;

Function FormatFloat(const format: string value: extension; const format settings:TFormatSettings):string; Overload;

For example, if the string variable is Str and the floating-point variable f:=-100.25, then Str:=FormatFloat('0.00', f);

Happy programming!