Solved

Real Type Variables

Posted on 1998-04-28
2
134 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 141
Making delphi communicate with a c# service 16 103
How to debug For loops? 3 49
Delphi: making a BW image transparent 10 38
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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