- This topic has 8 replies, 4 voices, and was last updated 15 years, 1 month ago by .
-
Topic
-
we have a tclproc that goes through all the dr fields and pads with 0’s up to 5 long. So if a number is 123 it makes it 00123. Apparently in the dr fields they can have “” in the field and the proc just puts 000″” but apparently this messes up the document in the application. How would i put in the change that if that field is “” then just leave it or else change it. I have messed around with regexp, continue, break and a few others trying to get it going. Any tips on how to do this. proc FormatDrNum { DrFldList subSep } {
set i 0
foreach Dr $DrFldList {
set subfldList [split $Dr $subSep]
lset subfldList 0 [format “%05s” [lindex $subfldList 0]]
lset DrFldList $i [join $subfldList $subSep]
incr i
}
return $DrFldList
}
Viewing 7 reply threads
Viewing 7 reply threads
- The forum ‘Tcl Library’ is closed to new topics and replies.