Evaluated proc asc2hb_pair twolines { set lines [nlsplit $twolines]; set sizes [cgetsize $twolines]; set l1 [first $lines]; set l2 [second $lines]; set out ""; for {set x 0} {$x < [first $sizes]} {incr x} {set f [second [cgetchar $twolines $x 0]]; set b [second [cgetchar $twolines $x 1]]; if {[string is digit $f$b] == 1} { append out [chb $f $b] } elseif {[string is digit $f] == 1 || [string is digit $b] == 1} { append out [chb $f $f] } }; . $out }