Solved

string formatting

Posted on 2000-02-22
6
139 Views
Last Modified: 2010-04-04
How can I use specify width and decimal parameter in Str(X [: Width [: Decimals ]]; var S) procedure ?

How can I format a integer (e.g. 123, 1234) to string 00000123 and 00001234 ?

Andrew
0
Comment
Question by:andrewyu
  • 2
  • 2
  • 2
6 Comments
 
LVL 6

Expert Comment

by:edey
ID: 2547220
you should see the format function


GL
Mike
0
 
LVL 6

Expert Comment

by:edey
ID: 2547228
oh, and "format strings" in the delphi help would be a good thing to check out too

GL
Mike
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 10 total points
ID: 2547561
Hi,

eg : Format('%.10d', [124])

showmessage(Format('%.10d', [124]));


Zif.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:andrewyu
ID: 2550661
Thank you very much !

Andrew
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2551163
andrewyu,

can you accept a comment (which you find did helped you first/most) as an answer? So this question is moved to the solved question.

TIA,

Zif.
0
 

Author Comment

by:andrewyu
ID: 2552594
Thank you very much !

Andrew
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 67
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 44
CheckListBox usage 3 71
scroll down TListBox component in Delphi 1 19
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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