Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Anyone got a zero fill (left) tcl proc or fragment? › Reply To: Anyone got a zero fill (left) tcl proc or fragment?
June 3, 2005 at 5:16 pm
#56740
David Caragay
Participant
hcitcl>set x “123456”
hcitcl>set x1 ” 3456″
hcitcl>set x2 “3456”
hcitcl>set y [format “%06d” $x]
hcitcl>echo $y
123456
hcitcl>set y [format “%06d” $x1]
hcitcl>echo $y
003456
hcitcl>set y [format “%06d” $x2]
hcitcl>echo $y
003456