title: While Loop won't terminate?
body: <p>I'm using a while loop and it won't terminate when it should. If it was working correctly, then it would terminate when <code>randno</code> was either <code>== highbound</code> or <code>== lowbound</code>.</p>
  
  <p>Code of the loop:</p>
  
  <pre><code>do {
      do {
          randno = (int) (Math.round((Math.random()*(4)) + 0.5)-1);
          direction = getDirection(randno,heading);      
      } while (robot.look(direction)==IRobot.WALL);
      System.out.println(randno);
      System.out.println(highbound);
      System.out.println(lowbound);
      System.out.println("---------------");
  } while (randno!=lowbound | randno!=highbound);
  </code></pre>
  
  <p>The output is either <code>3 3 2 ------</code>, or <code>2 3 2 ------</code>, so the loop should end. The first loop ends properly (I embedded them to try and get it to work...). What is going wrong?</p>