anirban2k2001
Programmer
Hello everyone,
I need to write some fixed length data to a text file. I have a
variable named val whose value needs to be of a fixed length, say 7
characters. How do I pad the val variable with leading zero's so that
the length of the value stored in the variable is 7.
Example:
set rdg $val
where val contains '123'
I need to pad val so that it looks like '0000123'
Hope I have made myself clear.
Regards,
Anirban Sarkar.
I need to write some fixed length data to a text file. I have a
variable named val whose value needs to be of a fixed length, say 7
characters. How do I pad the val variable with leading zero's so that
the length of the value stored in the variable is 7.
Example:
set rdg $val
where val contains '123'
I need to pad val so that it looks like '0000123'
Hope I have made myself clear.
Regards,
Anirban Sarkar.