Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.10.02;
Скачать: 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 вся ветка

Текущий архив: 2003.10.02;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.013 c
3-3736
Dimedrol
2003-09-12 13:45
2003.10.02
After Before Update Trigger in Firebird


14-4062
Devil
2003-09-14 22:30
2003.10.02
у кого есть Корсары 2 - ПОМОГИТЕ


8-3994
TuZ
2003-06-05 13:21
2003.10.02
Проигрывание звука из RES.


1-3990
Mantor
2003-09-19 13:44
2003.10.02
Type Library


1-3980
ah
2003-09-19 21:22
2003.10.02
есть предположим стринг= asdf , мне нужно определить коды