<?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[auf Integer überprüfen]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich versuche eine Eingabe eine Edit-Feldes zu testen ob es ein Integer ist. Ich habe dazu auch is_integer() gefunden, doch das will nicht so wie ich es will.</p>
<pre><code>if(is_integer(Edit3-&gt;Text)){
    Panel4-&gt;Caption=Edit3-&gt;Text;
    }
else {
    Panel1-&gt;Caption=&quot;Die Anzahl Steine ist keine Ganzzahl!&quot;;  
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/171666/auf-integer-überprüfen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 06:11:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171666.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Jan 2007 08:38:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to auf Integer überprüfen on Sun, 28 Jan 2007 08:38:54 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich versuche eine Eingabe eine Edit-Feldes zu testen ob es ein Integer ist. Ich habe dazu auch is_integer() gefunden, doch das will nicht so wie ich es will.</p>
<pre><code>if(is_integer(Edit3-&gt;Text)){
    Panel4-&gt;Caption=Edit3-&gt;Text;
    }
else {
    Panel1-&gt;Caption=&quot;Die Anzahl Steine ist keine Ganzzahl!&quot;;  
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1218455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218455</guid><dc:creator><![CDATA[smiling_cobra]]></dc:creator><pubDate>Sun, 28 Jan 2007 08:38:54 GMT</pubDate></item><item><title><![CDATA[Reply to auf Integer überprüfen on Sun, 28 Jan 2007 09:12:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">try
{
  int Wert = StrToInt(Edit3-&gt;Text);
  Panel4-&gt;Caption = Edit3-&gt;Text;
}
catch(...)
{
  Panel1-&gt;Caption=&quot;Die Anzahl Steine ist keine Ganzzahl!&quot;;
}
</code></pre>
<p>Achtung : Wenn nicht umgewandelt werden kann, kommt in der IDE die Anzeige der Exception. Das ist normal und stört nicht, im reallen Programm ohne IDE erscheint die Exception nicht mehr.</p>
<p>Allerdings ist es besser gleich von vornherein Falscheingaben zu verhindern. Entweder mit TMaskEdit oder so <a href="http://www.bytesandmore.de/rad/index.htm?http://www.bytesandmore.de/rad/cpp/snipp/sc02025.php" rel="nofollow">hier</a>.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1218463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1218463</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 28 Jan 2007 09:12:11 GMT</pubDate></item></channel></rss>