SysUtils.FloatToTextFmt

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From SysUtils.pas

	function FloatToTextFmt(Buf: PAnsiChar;
		const Value;
		ValueType: TFloatValue;
		Format: PAnsiChar): Integer; overload;
 
	function FloatToTextFmt(Buf: PAnsiChar;
		const Value;
		ValueType: TFloatValue;
		Format: PAnsiChar;
		const FormatSettings: TFormatSettings): Integer; overload;
 
	function FloatToTextFmt(Buf: PWideChar;
		const Value;
		ValueType: TFloatValue;
		Format: PWideChar): Integer; overload;
 
	function FloatToTextFmt(Buf: PWideChar;
		const Value;
		ValueType: TFloatValue;
		Format: PWideChar;
		const FormatSettings: TFormatSettings): Integer; overload;


Unit: SysUtils

Type: function

Visibility: public

C++ Information

From SysUtils.hpp

	int __fastcall FloatToTextFmt(char * Buf,
		const void * Value,
		Sysutils::TFloatValue ValueType,
		char * Format);


Unit: SysUtils

Type: function

Description

Converts a floating-point value to an unterminated character string, using a specified format.


Use FloatToTextFmt to format a floating-point value using a format string rather than using a predefined format. To use a predefined format, use the FloatToText or FloatToStrF function instead.

The Value parameter must be a variable of type Extended or Currency, as indicated by the ValueType parameter. The resulting string of characters is stored in the given buffer, and the returned value is the number of characters stored. The resulting string is not null-terminated.

Formats supported are described as part of the FormatFloat function.

The first form of FloatToTextFmt is not thread-safe, because it uses localization information contained in global variables. The second form of FloatToTextFmt, which is thread-safe, refers to localization information contained in the FormatSettings parameter. Before calling the thread-safe form of FloatToTextFmt, you must populate FormatSettings with localization information. To populate FormatSettings with a set of default locale values, call GetLocaleFormatSettings.

See Also

Personal tools
Translations
Newest Version