Solved

string formatting

Posted on 2000-02-22
6
135 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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