title: Does any language have a while-else flow structure?
body: <p>Consider this flow structure which I happen to use often:</p>
  
  <pre><code>if ( hasPosts() ) {
      while ( hasPosts() ) {
          displayNextPost();
      }
  } else {
      displayNoPostsContent();
  }
  </code></pre>
  
  <p>Are there any programming languages which have an optional <code>else</code> clause for <code>while</code>, which is to be run if the while loop is never entered? Thus, the code above would become:</p>
  
  <pre><code>while ( hasPosts() ) {
      displayNextPost();
  } else {
      displayNoPostsContent();
  }
  </code></pre>
  
  <p>I find it interesting that many languages have the <code>do-while</code> construct (run the while code once before checking the condition) yet I have never seen <code>while-else</code> addressed. There is precedent for running an N block of code based on what was run in N-1 block, such as the <code>try-catch</code> construct.</p>
  
  <p><strong>I wasn't sure whether to post here or on programmers.SE. If this question is more appropriate there, then please move it. Thanks.</strong></p>