title: Absolutely mystified with this TCL code
body: <p>I'm just beginning to code in TCL and there is this while loop code:</p>
  
  <pre><code>set x 0
  while "$x &lt; 5" {
      set x [expr {$x + 1}]
      if {$x &gt; 7} break
      if "$x &gt; 3" continue
      puts "x is $x"
  }
  
  puts "exited second loop with X equal to $x"
  </code></pre>
  
  <p>Which outputs:</p>
  
  <pre><code>x is 1
  x is 2
  x is 3
  exited second loop with X equal to 8
  Press any key to continue . . .
  </code></pre>
  
  <p>Which is ABSOLUTELY confusing me. I'm curious, would <code>"$x &gt; 3"</code> be evaluated as if <code>[expr {"$x &gt; 3"}]</code> or as if (this is a string, and since it's just a string in itself it's true.)</p>
  
  <p>How does it work? Give me the mechanics. Huge migraine trying to figure this out.</p>