Formating float problem.

  • Hi, I have searched the forum, but didnt found the solution, so here goes my question:

    I am using the FloatToCurr function to make a float number "nice".
    but I dont want the currency at all - and I dont see a function for this.

    Is there a function to use for formating a number into this format:

    1.333.222.111,12

    thanks.

    - Btw, I have tried this solution:
    var
    mysum : real;
    begin
    mysum := 123.45;
    DBWPEvalEngine1.Variables.Add('mysum := ' + Format('%8.2n', [mysum]));
    end;

    BUT, when I use <<@mysum>> it only print integer numbers? - is this a bug? or is there something I havnt seen?

    - Btw - Btw - If you want a reseller in Denmark, I can do the job for you.
    Get back to me, if this have any interrest.
    Best regards
    Dennis
    ________
    easyvape vaporizer

    Einmal editiert, zuletzt von itognet (1. Februar 2011 um 12:03)

    • Offizieller Beitrag

    Hi,

    I don't have an answer here. The EvenEngine is limited to use standard float numbers - with one decimal point.

    You will neeed to use the GetText event and format the number in your code. (You can use EvalEngine to "Evaluate()" the string after @ and format the result)

    Julian

  • Hope I'm not missing the point here, but if you are still looking for a function to format in code, you can use the Delphi FloatToStrF. The Format parameter gives you all the possible combinations you may need.