<?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[*rechnen* mit Edit1 Komponente ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>der Titel klingt vielleicht etwas merkwürdig... In der Edit1 Komponente soll man eine &quot;Rechenaufgabe&quot; schreiben können z.B. 4 / 2 usw., wo das Ergebnis der &quot;Rechenaufgabe&quot; in der Panel1 Komponente &quot;auftauchen&quot; soll ..</p>
<p>Code:</p>
<pre><code>if(Edit1-&gt;Text.AnsiPos(Edit1-&gt;Text / Edit1-&gt;Text) &gt; 1)
Panel1-&gt;Caption = StrToInt (Edit1-&gt;Text);
</code></pre>
<p>Das Programm lässt sich zwar probemlos compilieren nur wenn ich eine Rechenaufgabe in die Edit1 - Komponente schreibe, kommt folgende Fehlermeldung:</p>
<pre><code>Variante des Typs (String) konnte nicht in Typ (Integer) konvertiert werden!
</code></pre>
<p>... Warum ?</p>
<p>Gruß<br />
Harry</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/176792/rechnen-mit-edit1-komponente</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 06:28:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/176792.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 25 Mar 2007 00:20:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 00:20:01 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>der Titel klingt vielleicht etwas merkwürdig... In der Edit1 Komponente soll man eine &quot;Rechenaufgabe&quot; schreiben können z.B. 4 / 2 usw., wo das Ergebnis der &quot;Rechenaufgabe&quot; in der Panel1 Komponente &quot;auftauchen&quot; soll ..</p>
<p>Code:</p>
<pre><code>if(Edit1-&gt;Text.AnsiPos(Edit1-&gt;Text / Edit1-&gt;Text) &gt; 1)
Panel1-&gt;Caption = StrToInt (Edit1-&gt;Text);
</code></pre>
<p>Das Programm lässt sich zwar probemlos compilieren nur wenn ich eine Rechenaufgabe in die Edit1 - Komponente schreibe, kommt folgende Fehlermeldung:</p>
<pre><code>Variante des Typs (String) konnte nicht in Typ (Integer) konvertiert werden!
</code></pre>
<p>... Warum ?</p>
<p>Gruß<br />
Harry</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251993</guid><dc:creator><![CDATA[*Harry*]]></dc:creator><pubDate>Sun, 25 Mar 2007 00:20:01 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 00:53:21 GMT]]></title><description><![CDATA[<p>du willst einen parser, mit dem zu den string zerlegst und stueckweise berechnest.</p>
<p>oder du lernst ne scriptsprache. die haben im gegensatz zu C/C++ meistens ein eval().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252008</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252008</guid><dc:creator><![CDATA[c.rackwitz]]></dc:creator><pubDate>Sun, 25 Mar 2007 00:53:21 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 10:48:58 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>könnte man das nicht irgendwie anders machen ?</p>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252111</guid><dc:creator><![CDATA[*Haary*]]></dc:creator><pubDate>Sun, 25 Mar 2007 10:48:58 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 11:27:03 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Nein. Weder C++ noch die VCL haben einen eingebauten mathematischen Parser. Entwede schreibst du dir selber einen oder benutzt eine externe Library, die du im Netz suchen kannst.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252137</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 25 Mar 2007 11:27:03 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 15:07:33 GMT]]></title><description><![CDATA[<p>Hallo *Harry*<br />
Vielleicht hilft dir das.</p>
<pre><code class="language-cpp">void __fastcall TForm1::Button1Click(TObject *Sender)
{

    Panel1-&gt;Caption =(String)StrToInt(Edit1-&gt;Text.SubString(1,
    Edit1-&gt;Text.AnsiPos(&quot;/&quot;)-1) )
               /
        StrToInt
        ( Edit1-&gt;Text.SubString(Edit1-&gt;Text.AnsiPos(&quot;/&quot;)+1,
        Edit1-&gt;Text.Length()-Edit1-&gt;Text.AnsiPos(&quot;/&quot;)+1) );

}
</code></pre>
<p>Sieht nicht schön aus.Ich weis.</p>
<p>MfG Schlumpi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252263</guid><dc:creator><![CDATA[Schlumpi]]></dc:creator><pubDate>Sun, 25 Mar 2007 15:07:33 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Sun, 25 Mar 2007 17:10:35 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>der Code ist auf den ersten Blick etwas unübersichtlich funktioniert theoretisch aber, jedoch kommt folgende Fehlermeldung:</p>
<pre><code>Abnormal Program termination!
</code></pre>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252354</guid><dc:creator><![CDATA[*harry*]]></dc:creator><pubDate>Sun, 25 Mar 2007 17:10:35 GMT</pubDate></item><item><title><![CDATA[Reply to *rechnen* mit Edit1 Komponente ? on Mon, 26 Mar 2007 07:44:05 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">StrToInt 
        ( Edit1-&gt;Text.SubString(Edit1-&gt;Text.AnsiPos(&quot;/&quot;)+1, 
        Edit1-&gt;Text.Length()-Edit1-&gt;Text.AnsiPos(&quot;/&quot;)+1) );
</code></pre>
<p>letzte Zeile:<br />
Edit1-&gt;Text.Length() =&gt; 3<br />
Edit1-&gt;Text.AnsiPos(&quot;/&quot;)+1 =&gt; 3<br />
Damit ist die Länge des SubStrings = 0.<br />
StrToInt dürfte somit eine Exception auslösen.<br />
Gruß,<br />
Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1252669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1252669</guid><dc:creator><![CDATA[Christian Sonder]]></dc:creator><pubDate>Mon, 26 Mar 2007 07:44:05 GMT</pubDate></item></channel></rss>