Solved

Real Type Variables

Posted on 1998-04-28
2
132 Views
Last Modified: 2010-04-06
How do I format the output of a Real type Var to a string of 2 decimal places?
0
Comment
Question by:sparklin
2 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 20 total points
ID: 1338681
Hi

You use the format function.

E.g.
  r := 4.566;
  s := Format('%8.2f', [r]);

Format can also be used to format money, hexadecimal, etc.

Cheers,
JB
0
 

Author Comment

by:sparklin
ID: 1338682
Thanks alot
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now