<?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[IsInteger ohne Exception ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich suche eine Möglichkeit herauszufinden, ob ein String ein Integer ist, ohne das ich bei Nichterfüllung eine Exception um die Ohren gehauen bekomme. Ich weiß das ich das natürlich mit einer simplen try catch Anweisung zur Laufzeit unterdrücken kann, aber bei der Entwicklung treibt es mich ein wenig in den Wahnsinn bei jedem Programmstart zich Fehlermeldungen wegklicken zu müssen...</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/113836/isinteger-ohne-exception</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:45:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/113836.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Jun 2005 13:47:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 13:47:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich suche eine Möglichkeit herauszufinden, ob ein String ein Integer ist, ohne das ich bei Nichterfüllung eine Exception um die Ohren gehauen bekomme. Ich weiß das ich das natürlich mit einer simplen try catch Anweisung zur Laufzeit unterdrücken kann, aber bei der Entwicklung treibt es mich ein wenig in den Wahnsinn bei jedem Programmstart zich Fehlermeldungen wegklicken zu müssen...</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818219</guid><dc:creator><![CDATA[Clip]]></dc:creator><pubDate>Mon, 27 Jun 2005 13:47:19 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 13:51:29 GMT]]></title><description><![CDATA[<pre><code>AnsiString::ToIntDef
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/818231</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818231</guid><dc:creator><![CDATA[BigNeal]]></dc:creator><pubDate>Mon, 27 Jun 2005 13:51:29 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 14:05:02 GMT]]></title><description><![CDATA[<p>ToIntDef() oder StrToIntDef() helfen natürlich nur, wenn Du nur einen bestimmten Wertebereich hast, den Du zulassen willst.<br />
Im BCB 6 gibt es noch TryStrToInt(), das ohne Default-Wert arbeitet.</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818259</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818259</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Mon, 27 Jun 2005 14:05:02 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 14:43:14 GMT]]></title><description><![CDATA[<p>du koenntest dir's ja haendisch schreiben: den String Zeichen fuer Zeichen durchgehen und schauen ob das jeweilige char numerisch ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818312</guid><dc:creator><![CDATA[Blue-Tiger]]></dc:creator><pubDate>Mon, 27 Jun 2005 14:43:14 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 15:02:13 GMT]]></title><description><![CDATA[<p>Blue-Tiger schrieb:</p>
<blockquote>
<p>du koenntest dir's ja haendisch schreiben</p>
</blockquote>
<p>Ich dachte immer die Funktionen gäbe es dafür, damit man sowas nicht machen muss? Bei Integer geht das ja noch,<br />
aber spätestens wenn man Fließkommazahlen selbst erkennen will, sieht die Sache nicht mehr so einfach aus.<br />
Da verlass ich mich lieber auf bewährte Funktionen, als auf mein eigenes (unvollständiges) Können.</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818347</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Mon, 27 Jun 2005 15:02:13 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 15:07:42 GMT]]></title><description><![CDATA[<p>Wenns nur um die Entwicklung geht: Du kannst in der IDE einzelne Exceptions ausschalten... Hab aber leider grad keinen BCB da und kann dir deshalb auch nicht grad sagen in welchem Tab der Optionen das jetzt war.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818357</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Mon, 27 Jun 2005 15:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Mon, 27 Jun 2005 20:40:40 GMT]]></title><description><![CDATA[<p>Tools -&gt; Debugger Optionen -&gt; Language Exceptions</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818597</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Mon, 27 Jun 2005 20:40:40 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 11:07:36 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<pre><code>TryStrToInt
</code></pre>
<blockquote>
<p>Beschreibung</p>
<p>TryStrToInt konvertiert den String S, der eine Zahl mit dem Typ Integer in Dezimal- oder Hexadezimalschreibweise repräsentiert, und weist das Ergebnis Value zu. Wenn S keine gültige Zahl repräsentiert, gibt TryStrToInt false, andernfalls true zurück.</p>
</blockquote>
<p>Nash</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818886</guid><dc:creator><![CDATA[Nash]]></dc:creator><pubDate>Tue, 28 Jun 2005 11:07:36 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 13:30:59 GMT]]></title><description><![CDATA[<p>Alexander Kempf schrieb:</p>
<blockquote>
<p>Im BCB 6 gibt es noch TryStrToInt(), das ohne Default-Wert arbeitet.</p>
</blockquote>
<p>Nash schrieb:</p>
<blockquote>
<pre><code>TryStrToInt
</code></pre>
<p>(...)</p>
</blockquote>
<p>Was ist jetzt dabei die neue Erkenntnis?</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/819013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/819013</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Tue, 28 Jun 2005 13:30:59 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 16:47:03 GMT]]></title><description><![CDATA[<p>Probiers mal so: (wenn int, dann atoi). Falsche Eingaben werden ignoriert, allerdings muss man bei float &quot;.&quot; statt &quot;,&quot; verwenden.</p>
<pre><code>const float a=12.3948;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  float b=a/(atof(Edit1-&gt;Text.c_str()));
  Edit2-&gt;Text=FloatToStr(b);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/819184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/819184</guid><dc:creator><![CDATA[helfer 23]]></dc:creator><pubDate>Tue, 28 Jun 2005 16:47:03 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 17:17:59 GMT]]></title><description><![CDATA[<p>Ach herje,<br />
natürlich sollte man nicht durch eine zurückgegebene Null dividieren. Sorry!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/819210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/819210</guid><dc:creator><![CDATA[helfer 23]]></dc:creator><pubDate>Tue, 28 Jun 2005 17:17:59 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 17:22:42 GMT]]></title><description><![CDATA[<p>So ist's besser:</p>
<pre><code>const float a=12.3948;
float b=atof(Edit1-&gt;Text.c_str());
  if (b==0)
  {
   Edit2-&gt;Text=&quot;Fehler&quot;;
  }
  else
  {
   Edit2-&gt;Text=a/b;
  }
</code></pre>
<p>Dann kann man alles eingeben, ohne das ein Fehlerfenster kommt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/819216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/819216</guid><dc:creator><![CDATA[helfer 23]]></dc:creator><pubDate>Tue, 28 Jun 2005 17:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to IsInteger ohne Exception ? on Tue, 28 Jun 2005 19:07:12 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Alexander Kempf schrieb:</p>
<blockquote>
<p>Alexander Kempf schrieb:</p>
<blockquote>
<p>Im BCB 6 gibt es noch TryStrToInt(), das ohne Default-Wert arbeitet.</p>
</blockquote>
<p>Nash schrieb:</p>
<blockquote>
<pre><code>TryStrToInt
</code></pre>
<p>(...)</p>
</blockquote>
<p>Was ist jetzt dabei die neue Erkenntnis?</p>
<p>Gruß,</p>
<p>Alexander</p>
</blockquote>
<p>Hatte ich überlesen...<br />
Kann ja mal passieren.</p>
<p>Nash</p>
]]></description><link>https://www.c-plusplus.net/forum/post/819301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/819301</guid><dc:creator><![CDATA[Nash]]></dc:creator><pubDate>Tue, 28 Jun 2005 19:07:12 GMT</pubDate></item></channel></rss>