set xy [list a b c]
#set xy "{a b c {cd de {efg fgh}}} 1 2 {34 45 {567 678}}"
puts "$xy"
set l [ llength $xy ]
set j 0
puts "the index:"
#the proc of index
proc indx {x i {k ""}} {
set len [ llength $x ]
set aa [lindex $x $i]
set b [llength $x]
if {($b == 1) && ($k == "")} {
#return "[lindex $x $i ]-->$i $i"
return "[lindex $x 0 ]-->$i "
} elseif {($b == 1)} {
return "[lindex $x $i ]-> $k- $i"
} else {
set s $i
if {$k != ""} {set s "$k-$s"}
return "[indx $aa $s]"
}
} ; #end of Proc
for {set m 0} {$m<$l} {incr m} {
set ak [indx $xy $j ]
#set j [lindex $ak 1]
puts "$j"
incr j
puts "$ak"
}