do {...} while(false)
<p>I was looking at some code by an individual and noticed he seems to have a pattern in his functions:</p>

<pre><code>&lt;return-type&gt; function(&lt;params&gt;)
{
 &lt;initialization&gt;

 do
 {
   &lt;main code for function&gt;
 }
 while(false);

 &lt;tidy-up &amp; return&gt;
}
</code></pre>

<p>It's not <em>bad</em>, more peculiar (the actual code is fairly neat and unsurprising). It's not something I've seen before and I wondered if anyone can think of any logic behind it - background in a different language perhaps?</p>
