Hi,vesna,
I need to write almost 1000 *.txt file in one txt file.
for example,
This is my record in Periods%i.txt
but if I calculate 1000 times,there will have 1000 periods.txt
and now i need only one periods.txt and all 1000 results in it.
FOR EXAMPLE :
T1 T2 T3
1 0.4 0.5
2 3 4
.......
HOW CAN I CHANGE TE CODE BELOW?
set period [format "Periods%i.txt" $k]
set Periods [open $period "w"]
foreach t1 T1=$T1 t2 T2=$T2 t3 T3=$T3 {
puts $Periods " $t1 $t2 $t3 "
}
close $Periods
THANKS
Recorder question
Moderators: silvia, selimgunay, Moderators
Re: Recorder question
You can do all in one step. Why do you need 1000 files.
The first time you write it have it like this:
set Periods [open $period "w"]
and every other time you write it have it like this:
set Periods [open $period "a"]
The first time you write it have it like this:
set Periods [open $period "w"]
and every other time you write it have it like this:
set Periods [open $period "a"]