| |||||||||||
add leading zeros to a variable? Posted by redstapler (redstapler), 4 December 2007 I have a variable incrementing in a loop that is appended to a file name, so they are outputted like: file1.bmp, file2.bmp etc.. though I need them like this: file001.bmp, file002.bmp. I tried doing set var [printf %03d $var] but the variable it returns is always empty.Posted by admin (Graham Ellis), 4 December 2007 Have you tried replacing printf with format?This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
Other Forum Posts Follow us on ... | ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |