• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

Real Type Variables

How do I format the output of a Real type Var to a string of 2 decimal places?
0
sparklin
Asked:
sparklin
1 Solution
 
JimBob091197Commented:
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
 
sparklinAuthor Commented:
Thanks alot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now