<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bedingung in For-Schleife schon für den Startwert prüfen?]]></title><description><![CDATA[<p>Betrachte</p>
<pre><code>for(int i = bla() - 1; i &gt;= 0; --i)
</code></pre>
<p>Wie programmiere ich es am elegantesten, dass &quot;i &gt;= 0&quot; schon für &quot;int i = bla() - 1;&quot; getestet wird?<br />
Also</p>
<pre><code>int i = bla() - 1;
while (i &gt;= 0)
{
   ...
   --i;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/323358/bedingung-in-for-schleife-schon-für-den-startwert-prüfen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 03:42:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323358.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Jan 2014 14:51:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bedingung in For-Schleife schon für den Startwert prüfen? on Mon, 27 Jan 2014 14:51:00 GMT]]></title><description><![CDATA[<p>Betrachte</p>
<pre><code>for(int i = bla() - 1; i &gt;= 0; --i)
</code></pre>
<p>Wie programmiere ich es am elegantesten, dass &quot;i &gt;= 0&quot; schon für &quot;int i = bla() - 1;&quot; getestet wird?<br />
Also</p>
<pre><code>int i = bla() - 1;
while (i &gt;= 0)
{
   ...
   --i;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2379923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2379923</guid><dc:creator><![CDATA[dfsdffd]]></dc:creator><pubDate>Mon, 27 Jan 2014 14:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Bedingung in For-Schleife schon für den Startwert prüfen? on Mon, 27 Jan 2014 14:55:51 GMT]]></title><description><![CDATA[<p>so ist es standardmässig in der forschleife.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2379926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2379926</guid><dc:creator><![CDATA[Fytch]]></dc:creator><pubDate>Mon, 27 Jan 2014 14:55:51 GMT</pubDate></item></channel></rss>