title: Can I make a loop that start from a certain pointer and end where it started?
body: <p>I'm trying to construct what resembles the clock policy algorithm.<br>
    Now I need my loop to a perfect clock starting from a pointer and ending at it if it didn't find what it's looking for i.e :-<br>
  <code>for(i=ptr;i&lt;50;i++)</code><br>
  then if it didn't find what it's looking for it's going to loop from<br>
  <code>( i = 0 ; i &lt; ptr; i++)</code><br>
  Is there a way to make this logic in one loop?</p>