<?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[AnsiString numerisch?]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>gibt es denn eine einfache und schnelle Möglichkeit zu überprüfen, ob ein AnsiString numerisch ist?</p>
<p>Ich habe ein StringGrid wo der Benutzer nur numerische Ausdrücke verwenden darf.</p>
<p>Muss ich das z.B. mit IsNumeric überprüfen, char by char oder gibt es eine Möglichkeit den kompletten Ausdruck (StringGrid1-&gt;Cells[j][i]) auf numerisch hin zu prüfen?</p>
<p>Danke<br />
Todd</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186796/ansistring-numerisch</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 15:11:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186796.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Jul 2007 12:46:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 12:46:22 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>gibt es denn eine einfache und schnelle Möglichkeit zu überprüfen, ob ein AnsiString numerisch ist?</p>
<p>Ich habe ein StringGrid wo der Benutzer nur numerische Ausdrücke verwenden darf.</p>
<p>Muss ich das z.B. mit IsNumeric überprüfen, char by char oder gibt es eine Möglichkeit den kompletten Ausdruck (StringGrid1-&gt;Cells[j][i]) auf numerisch hin zu prüfen?</p>
<p>Danke<br />
Todd</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323856</guid><dc:creator><![CDATA[Todd]]></dc:creator><pubDate>Thu, 12 Jul 2007 12:46:22 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 12:50:09 GMT]]></title><description><![CDATA[<p>Du kannst versuchen, den String in einen int-Wert umzuwandeln - wenn das einen Fehler ergibt, war er nicht numerisch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323862</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 12 Jul 2007 12:50:09 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 12:50:27 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>StrToInt, wenn nicht umgewandelt werden kann kommt eine Exception die du abfangen kannst.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323863</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 12 Jul 2007 12:50:27 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 12:53:50 GMT]]></title><description><![CDATA[<p>Danke für die prompte hilfe,</p>
<p>wenn das mit StrToInt geht geht das sicherlich auch mit StrToFloat...<br />
werde es gleich mal ausprobieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323868</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323868</guid><dc:creator><![CDATA[Todd]]></dc:creator><pubDate>Thu, 12 Jul 2007 12:53:50 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 12:57:02 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ja das Verhalten ist genau das gleiche, nur für float/double.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323872</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 12 Jul 2007 12:57:02 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 13:40:30 GMT]]></title><description><![CDATA[<p>Okay...<br />
Ich habe das jetzt an einem kleinen Beispiel ausprobiert, aber es funktioniert nicht. Die Exception Meldung kommt trotzdem:</p>
<p>Form...ein Edit...ein Button:</p>
<pre><code class="language-cpp">void __fastcall TForm1::Button1Click(TObject *Sender)
{
 try {StrToFloat(Edit1-&gt;Text);}
 catch(...)
 {
  ShowMessage(&quot;Keine zulässige Eingabe&quot;);
 }
}
</code></pre>
<p>Zur Vollständigkeit hier die Exception Message:<br />
&quot;Projekt Project1.exe raised exception class EConvertError with message &quot;...&quot; is not a valid floating point value. Process stopped...</p>
<p>Was ist denn hier falsch?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323900</guid><dc:creator><![CDATA[Todd]]></dc:creator><pubDate>Thu, 12 Jul 2007 13:40:30 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 13:46:08 GMT]]></title><description><![CDATA[<p>Die Meldung kommt immer, so lange Du im Debug-Modus kompilierst und in der IDE ausführst. Könnte man notfalls abschalten, sehe ich aber keinen Sinn drin.</p>
<p>Wichtig ist, wenn Du das Programm endgültig kompilierst, kommt diese Meldung nicht mehr.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323904</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 12 Jul 2007 13:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 13:49:37 GMT]]></title><description><![CDATA[<p>Alles klar...vielen Dank.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1323909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1323909</guid><dc:creator><![CDATA[Todd]]></dc:creator><pubDate>Thu, 12 Jul 2007 13:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to AnsiString numerisch? on Thu, 12 Jul 2007 22:11:01 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Warum benutzt Du nicht &quot;TryStrToFloat&quot; ?</p>
<blockquote>
<p>Die Routine <strong>TryStrToFloat</strong> konvertiert einen String in einen Gleitkommawert und meldet den Erfolg der Ausführung mit einem booleschen Wert.</p>
<p>Unit</p>
<p>SysUtils</p>
<p>Kategorie</p>
<p>Gleitkomma-Konvertierung</p>
<p>extern PACKAGE bool __fastcall TryStrToFloat(const AnsiString S, Extended &amp;Value);<br />
extern PACKAGE bool __fastcall TryStrToFloat(const AnsiString S, double &amp;Value);<br />
extern PACKAGE bool __fastcall TryStrToFloat(const AnsiString S, float &amp;Value);</p>
<p>Beschreibung</p>
<p>Rufen Sie TryStrToFloat auf, um einen AnsiString-Wert in S in einen Gleitkommawert zu konvertieren. S muß aus einem optionalen Vorzeichen (+ oder -), einem aus Ziffern bestehenden String mit optionalem Dezimaltrennzeichen und einer optionalen Mantisse gebildet sein. Die Mantisse besteht aus 'E' bzw. 'e', gefolgt von einem optionalen Vorzeichen und einem Integer. Vor- und nachgestellte Leerzeichen werden ignoriert.</p>
<p>Die globale Variable DecimalSeparator definiert das Zeichen, das als Dezimaltrennzeichen verwendet wird. Tausendertrennzeichen und Währungssymbole dürfen sich nicht im String befinden. Enthält der String keinen gültigen Wert, gibt TryStrToFloat den Wert Default zurück.</p>
<p>TryStrToFloat fügt das Ergebnis in Value ein und gibt true zurück, wenn die Konvertierung durchgeführt werden konnte. Andernfalls wird false zurückgegeben.</p>
</blockquote>
<p>Nash</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324209</guid><dc:creator><![CDATA[Nash]]></dc:creator><pubDate>Thu, 12 Jul 2007 22:11:01 GMT</pubDate></item></channel></rss>