Solved

string formatting

Posted on 2000-02-22
6
137 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

813 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

12 Experts available now in Live!

Get 1:1 Help Now