Hello

I've at first used the solution FloatToStrF(adouble,ffFixed, 20, 10) at first, 
but your solution is even more controlable and thus easier.

Thanks

andries

Martin Wynne <[EMAIL PROTECTED]> wrote:                                  Hi 
Andries,
 
 Try using FormatFloat() instead of FloatToStrF().
 
 FormatFloat gives you more control over the formatting. If you omit
 an E from the format string, scientific notation isn't used unless the
 value has more than 18 digits to the left of the decimal point (which
 it won't have for a double).
 
 You can force whatever you want using a suitable format string:
 
 e.g.  
 
 var
    x:double;
 
 s:=FormatFloat ('##############0000.00################',x);
 
 would mean no scientific notation or rounding would be used, and
 leading and trailing zeroes would be added to ensure at least 4 digits
 before the decimal point and 2 digits after it.
 
 See the Help for FormatFloat, it's very flexible and you can specify
 different formatting for positive and negative values.
 
 Martin.
 
 
     
                       

                
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to