title: How to break an infinite for(;;) loop in C?
body: <p>I have a vital infinite for loop that allows a sensor to keep updating its values. However I would like to break that for loop when another sensor brings in new values. How can I switch from one infinite for loop to another?</p>
  
  <p>Current code:</p>
  
  <pre><code>for(;;){
  
      SON_Start();
      // Wait 65ms for max range time
      delay10ms(7);
      // Read Range
      i = SON_Read(SON_ADDRESSES[sonarReading]);
      // pause
      delayMs(100);
          if(i&lt;15)
          drive(200, RadCW);
  
      }
  </code></pre>
  
  <p>What I would like to add:</p>
  
  <p>If <code>Sensor2</code> returns a reading (e.g. <code>Sensor2 &gt; 20</code>), then I want to break the loop and goto another infinite for loop to begin a new function.</p>