mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:46:00 +02:00
+ Added FormatCurr by Uberto Barbini
This commit is contained in:
parent
89e6318dd8
commit
525e2cf1ff
@ -947,7 +947,7 @@ Begin
|
|||||||
P:=Pos(DecimalSeparator,S);
|
P:=Pos(DecimalSeparator,S);
|
||||||
If (P<>0) Then
|
If (P<>0) Then
|
||||||
S[P] := '.';
|
S[P] := '.';
|
||||||
Val(S,Value,E);
|
Val(trim(S),Value,E);
|
||||||
Result:=(E=0);
|
Result:=(E=0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -1791,7 +1791,11 @@ Begin
|
|||||||
Result:=StrPas(@Buf);
|
Result:=StrPas(@Buf);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
function FormatCurr(const Format: string; Value: Currency): string;
|
||||||
|
begin
|
||||||
|
Result := FormatFloat(Format, Value);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{==============================================================================}
|
{==============================================================================}
|
||||||
{ extra functions }
|
{ extra functions }
|
||||||
@ -2094,7 +2098,10 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.35 2005-03-25 22:53:39 jonas
|
Revision 1.36 2005-04-26 16:40:51 michael
|
||||||
|
+ Added FormatCurr by Uberto Barbini
|
||||||
|
|
||||||
|
Revision 1.35 2005/03/25 22:53:39 jonas
|
||||||
* fixed several warnings and notes about unused variables (mainly) or
|
* fixed several warnings and notes about unused variables (mainly) or
|
||||||
uninitialised use of variables/function results (a few)
|
uninitialised use of variables/function results (a few)
|
||||||
|
|
||||||
|
@ -161,6 +161,7 @@ Function FloatToTextFmt(Buffer: PChar; Value: Extended; format: PChar): Integer;
|
|||||||
Procedure FloatToDecimal(Var Result: TFloatRec; Value: Extended; Precision, Decimals : integer);
|
Procedure FloatToDecimal(Var Result: TFloatRec; Value: Extended; Precision, Decimals : integer);
|
||||||
Function FormatFloat(Const Format : String; Value : Extended) : String;
|
Function FormatFloat(Const Format : String; Value : Extended) : String;
|
||||||
Function IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;
|
Function IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;
|
||||||
|
function FormatCurr(const Format: string; Value: Currency): string;
|
||||||
|
|
||||||
{// MBCS Functions. No MBCS yet, so mostly these are calls to the regular counterparts.}
|
{// MBCS Functions. No MBCS yet, so mostly these are calls to the regular counterparts.}
|
||||||
Type
|
Type
|
||||||
@ -202,7 +203,10 @@ function BCDToInt(Value: integer): integer;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 2005-03-12 14:56:22 florian
|
Revision 1.17 2005-04-26 16:40:51 michael
|
||||||
|
+ Added FormatCurr by Uberto Barbini
|
||||||
|
|
||||||
|
Revision 1.16 2005/03/12 14:56:22 florian
|
||||||
+ added Ansi* routines to widestring manager
|
+ added Ansi* routines to widestring manager
|
||||||
* made them using OS calls on windows
|
* made them using OS calls on windows
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user