Forum Discussion
Nov 08, 2007
You can use any of the TCL list commands (llength, lindex, etc) with a data group. For looping through a class called ClassList, you could do the following:
set count [llength $::ClassList]
for {set i 0} {$i < $count} {incr i} {
set val [lindex $::ClassList $i]
log local0. "ClassList($i) : $val"
}
Or you could do it with a foreach loop like this:
foreach val $::ClassList {
log local0. "ClassList Item : $val"
}
Hope this helps...
-Joe