Răsfoiți Sursa

* Forgot to commit FormatFloat builtin

git-svn-id: trunk@37005 -
michael 8 ani în urmă
părinte
comite
42e716278b
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      packages/fcl-base/src/fpexprpars.pp

+ 6 - 0
packages/fcl-base/src/fpexprpars.pp

@@ -3853,6 +3853,11 @@ begin
   Result.resDateTime:=StrToDateTimeDef(Args[0].resString,Args[1].resDateTime);
   Result.resDateTime:=StrToDateTimeDef(Args[0].resString,Args[1].resDateTime);
 end;
 end;
 
 
+procedure BuiltInFormatFloat(Var Result : TFPExpressionResult; Const Args : TExprParameterArray);
+begin
+  result.ResString := FormatFloat(Args[0].resString, Args[1].ResFloat);
+end;
+
 Procedure BuiltInBoolToStr(Var Result : TFPExpressionResult; Const Args : TExprParameterArray);
 Procedure BuiltInBoolToStr(Var Result : TFPExpressionResult; Const Args : TExprParameterArray);
 
 
 begin
 begin
@@ -4008,6 +4013,7 @@ begin
       AddFunction(bcConversion,'strtotimedef','D','SD',@BuiltInStrToTimeDef);
       AddFunction(bcConversion,'strtotimedef','D','SD',@BuiltInStrToTimeDef);
       AddFunction(bcConversion,'strtodatetime','D','S',@BuiltInStrToDateTime);
       AddFunction(bcConversion,'strtodatetime','D','S',@BuiltInStrToDateTime);
       AddFunction(bcConversion,'strtodatetimedef','D','SD',@BuiltInStrToDateTimeDef);
       AddFunction(bcConversion,'strtodatetimedef','D','SD',@BuiltInStrToDateTimeDef);
+      AddFunction(bcConversion,'formatfloat','S','SF',@BuiltInFormatFloat);
       end;
       end;
     if bcAggregate in Categories then
     if bcAggregate in Categories then
       begin
       begin