RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.CurrToStrF Function

Converts a Currency value to a string, using a specified format.

Pascal
function CurrToStrF(Value: Currency; Format: TFloatFormat; Digits: Integer): string; overload;
function CurrToStrF(Value: Currency; Format: TFloatFormat; Digits: Integer; const FormatSettings: TFormatSettings): string; overload;
C++
AnsiString CurrToStrF(Currency Value, TFloatFormat Format, int Digits);
AnsiString CurrToStrF(Currency Value, TFloatFormat Format, int Digits, const TFormatSettings FormatSettings);

CurrToStrF converts the Currency value given by Value to its string representation using the indicated float format convention. A call to CurrToStrF corresponds to a call to FloatToStrF with an implied precision of 19 digits. 

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!