In particular, let's say I create a list with:
for {set i 0} {$i < $val(recv)} {incr i} {
lappend bwList "videoBW_($i).tr"
close $videoBW_($i)
}
and then I want to provide this list as an argument to multiple files with
exec xgraph $bwList -geometry 800x400 &
This will give me an error:
Warning: Cannot open the file `videoBW_ (0) .tr videoBW_ (1) .tr videoBW_ (2) .tr '
Since tcl reads the entire list as one line instead of several lines. Is there a way to read the list as multiple lines?
EDIT:
The solution for tcl8.4 is the one provided by Brian Fenton. but by changing the set exec_call {xgraph $ bwList -geometry 800x400} set exec_call "xgraph $ bwList -geometry 800x400"
Basically, if you just add eval before exec, it does the job.
eval exec xgraph $bwList -geometry 800x400 &
Fot tcl 8.5 .