On Tue, Sep 9, 2014 at 6:06 PM, Tomek Kott <tkott.onl...@outlook.com> wrote:
> As per my previous email about checkboxes, I realized that its much easier > to work with comma delimited lists for what I needed. Here are some > possibly useful TH1 scripts for checkboxes and comma delimited lists. > Thanks for contributing. > proc list_to_clist l { > set new_l "" > for {set i 0} {$i < [llength $l] } {set i [expr $i+1]} { > set new_l "$new_l[lindex $l $i], " > } > return [strip_last_comma $new_l] > } > I think this could be rewritten, assuming TH1's for works like C's for. proc list_to_clist l { set new_l [lindex $l $i] for {set i 1} {$i < [llength $l] } {set i [expr $i+1]} { set new_l "$new_l, [lindex $l $i]" } return $new_l } Disclaimer: I'm no expert on TH1 / TCL.
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users