title: Tcl error in xilinx isim simulator
body: <p>I am trying to write a tcl script for some simulations in isim. the script would run two nested loops and generate a file in each iteration. when running the simulation with this scrips the simulator generates the error:</p>
  
  <pre><code> TCL batch file "D:...subbyte.tcl" encountered an error in line 2. Simulator is exiting.
  </code></pre>
  
  <p>but all the output files are generated and saved. I am totally confused with it.
  Thanks for any help in advance!</p>
  
  <pre><code>run 100 ns
  for {set i 0} { $i&lt;1} {incr i} {
  
      for {set j 0} { $j&lt;256} {incr j} {
          saif open -scope uut -file "saifsubbyte $i$j .saif" -allnets
          run 1 ns
          saif close
          run 19 ns
      }
  
  }
  </code></pre>