title: For loop increment by a non-integer in TCL
body: <p>I want to implement the following C code in TCL:</p>
  
  <pre><code>Float power_pitch = 8
  float offset = 7.5
  float threshold = 100 
  for(i=power_pitch+offset ; i&lt;= threshold ; i += power_pitch)
  </code></pre>
  
  <p>I want to implement above forloop in TCL. I have tried the following code in TCL:</p>
  
  <pre><code>set power_pitch 8
  set offset 7.5
  set threshold 100
  for { set i [expr $power_pitch + $offset] } { $i &lt;= $threshold } { incr i $power_pitch}
  </code></pre>
  
  <p>but when I execute above code I get the following error:</p>
  
  <blockquote>
    <p>expected integer but got "15.5 "
    while executing incr i $power_pitch</p>
  </blockquote>
  
  <p>Could you help me to implement above forloop in TCL?</p>