mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:39:26 +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);
|
||||
If (P<>0) Then
|
||||
S[P] := '.';
|
||||
Val(S,Value,E);
|
||||
Val(trim(S),Value,E);
|
||||
Result:=(E=0);
|
||||
End;
|
||||
|
||||
@ -1791,7 +1791,11 @@ Begin
|
||||
Result:=StrPas(@Buf);
|
||||
End;
|
||||
|
||||
|
||||
function FormatCurr(const Format: string; Value: Currency): string;
|
||||
begin
|
||||
Result := FormatFloat(Format, Value);
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ extra functions }
|
||||
@ -2094,7 +2098,10 @@ const
|
||||
|
||||
{
|
||||
$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
|
||||
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);
|
||||
Function FormatFloat(Const Format : String; Value : Extended) : String;
|
||||
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.}
|
||||
Type
|
||||
@ -202,7 +203,10 @@ function BCDToInt(Value: integer): integer;
|
||||
|
||||
{
|
||||
$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
|
||||
* made them using OS calls on windows
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user