Try FloatToStrF. Example below.

Even though Extended is supposed to give 19 or 20 digits of precision, this
function gives you a maximum precision of only 18 digits.
 
Note also the following extract from the Delphi Help: (Remember that the
maximum precision is 18). "If the number of digits to the left of the
decimal point is greater than the specified precision, the resulting value
will use scientific format."

  Var X : Extended;  S : String;

  X:= -123456789012345678;  // 18 digits to left of decimal point - works.
  S:=FloatToStrF(X,ffFixed,18,2);
  ShowMessage(S);



Regards,
       Brendan Blake.
email: [EMAIL PROTECTED]  


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Tim
Sent: 31 March 2005 09:22
To: [email protected]
Subject: Formatting large numbers

Hi,

I need to be able to display very large numbers (precision > 16) in text 
strings. After some swearing and shouting, I find that I am able to 
manipulate the numbers using the Delhpi Extended data type (Delphi 5 
Enterprise).

But I cannot get them to display. Using the formatting routines simply 
produces scientific notation - and I need to be able to see the actual 
number as a string.

Any ideas?

Regards

Tim


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi



_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to