title: When comparing two equal integers in while loop, the equal-to operator fails?
body: <p>I've posted two examples below.<br><br>
  In the first example, I use the <b>equal-to</b> operator and the while process continues forever instead of breaking when it should.<br><br>
  In the second example, I use the <b>greater-than-or-equal-to</b> operator, and the process breaks when it should.<br><br>
  How is this even possible?<br></p>
  
  <p>EXAMPLE 1:</p>
  
  <pre><code>  Integer myVar1 = 42985;
    Integer myVar2 = 1;
    while (true)
    {
       if (myVar2 == myVar1)
       {
       break;
       }
  
    ++ myVar2;
    }
  </code></pre>
  
  <p>EXAMPLE 2:</p>
  
  <pre><code>  Integer myVar1 = 42985;
    Integer myVar2 = 1;
    while (true)
    {
       if (myVar2 &gt;= myVar1)
       {
       break;
       }
  
    ++ myVar2;
    }
  </code></pre>
  
  <p>EDIT:
  Thank you everyone for the great answers!
  I fully understand the problem now and this new information explained several strange behaviors that I've encountered in my apps.
  I wish I could choose more than one best answer.</p>