Posted to tcl by kbk at Mon Apr 16 16:13:18 GMT 2007view pretty

# Skeleton of a proc to make your 'tag' commands
proc makeCommands {nChannels {limit 100}} {
    for {set i 0} {$i < $nChannels} {incr i $limit} {
	set cmd "tag"
	set sep " "
	for {set j $i} {$j < $nChannels && $j < $i+$limit} {incr j} {
	    append cmd $sep $j
	    set sep ","
	}
	# Here is where you send the command
	puts $cmd
    }
}
makeCommands 20 5