Вниз
Скачать: CL | DM;

функция format   Найти похожие ветки 

← →
Unknown   (2003-09-20 10:42) [0]

В нелпе написанно:
Format strings
Format strings specify required formats to general-purpose formatting routines.

...

The following table summarizes the possible values for type:

d - Decimal. The argument must be an integer value. The value is converted to a string of decimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has less digits, the resulting string is left-padded with zeros.
...

я пишу ShowMessage(Format("%10d", [4]));
но вместо нулей в стринг добавляются пробелы.

Как мне все тки получить стринг дополненый с леав с нулями с помощью функции формат как это описанно в хелп?


← →
ZEE ©   (2003-09-20 10:55) [1]

Format("%.10d",[4])


← →
jack128 ©   (2003-09-20 10:59) [2]


> If the format string contains a precision specifier


← →
Unknown   (2003-09-20 11:01) [3]

понял, спасибо



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.017 c
1-3885
Artur
2003-09-20 15:08
2003.10.02
Компонент F1Book


1-3819
AlexMan
2003-09-22 14:24
2003.10.02
ToolBar


1-3823
evgeny_krasilov
2003-09-19 15:46
2003.10.02
TDBGrid, позиция указателя и нужная запись


4-4171
Unknown user
2003-07-30 18:49
2003.10.02
Как создать DIB?


11-3815
Bartov
2003-01-22 01:20
2003.10.02
Вышел KOL 1.62




   Наверх