?
Solved

string formatting

Posted on 2000-02-22
6
Medium Priority
?
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 40 total points
ID: 2547561
Hi,

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

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


Zif.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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