<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Cpmpare SMS sender no. with no. stored in .txt file - Comments</title>
 <link>http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file</link>
 <description>Comments for &quot;Cpmpare SMS sender no. with no. stored in .txt file&quot;</description>
 <language>en</language>
<item>
 <title>Re: Cpmpare SMS sender no. with no. stored in .txt file</title>
 <link>http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file#comment-41619</link>
 <description>&lt;p&gt;Well, yes, but what is the *deeper* reason it does not work, i.e. the if block gets executed with 0 *and* the if gets also executed with values other than 0 (something that is probably surprising and confusing)?&lt;/p&gt;

&lt;p&gt;It is because in the way the condition is written the &quot;!&quot; operator will work with all the bits of the value, so e.g. !3 does not give 0 but -4, right?&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 13:35:36 +0200</pubDate>
 <dc:creator>rbrunner</dc:creator>
 <guid isPermaLink="false">comment 41619 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Cpmpare SMS sender no. with no. stored in .txt file</title>
 <link>http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file#comment-41617</link>
 <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;SDK Help says: &lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;CompareC()&lt;/span&gt;&lt;br /&gt;TInt CompareC(const TDesC16&amp;amp; aDes) const;&lt;br /&gt;Description&lt;br /&gt;Compares data using the standard collation method.&lt;br /&gt;&lt;br /&gt;Compares this descriptor&amp;#039;s data with the specified descriptor&amp;#039;s data using the standard collation method appropriate to the current locale.&lt;br /&gt;&lt;br /&gt;Return value&lt;br /&gt;TInt Positive, if this descriptor is greater than the specified descriptor. Negative, if this descriptor is less than the specified descriptor. Zero, if the content of both descriptors match.&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;So if both numbers are different, the return value will be anything but 0.&lt;/span&gt; So if you want to verify if both numbers are same,then you should write:&lt;br /&gt;
if( Sender_no.CompareC(Stored_No) == 0 )        //compare nos..&lt;br /&gt;
{&lt;br /&gt;
.....&lt;br /&gt;
......&lt;br /&gt;
........&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&lt;span style=&quot;font-weight:bold&quot;&gt;&lt;span style=&quot;font-style:italic&quot;&gt;Note: Why is there a semi-colon in your code after the If statement??&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Moreover, you can simply do with &lt;span style=&quot;font-weight:bold&quot;&gt;Compare()&lt;/span&gt;. Why use &lt;span style=&quot;font-weight:bold&quot;&gt;CompareC() &lt;/span&gt;?&lt;/p&gt;</description>
 <pubDate>Wed, 19 Sep 2007 13:26:32 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41617 at http://www.newlc.com</guid>
</item>
<item>
 <title>Cpmpare SMS sender no. with no. stored in .txt file</title>
 <link>http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file</link>
 <description>&lt;p&gt;Hello friends,&lt;/p&gt;

&lt;p&gt;       I&#039;m developing SMS inteceptor.&lt;/p&gt;

&lt;p&gt;I want to intercept only those sms which comming from pertucular no. (Eg. 123456)&lt;/p&gt;

&lt;p&gt;I&#039;m able to intercept sms &amp; read its text body. &lt;br /&gt;
I also can get sender no. &lt;/p&gt;

&lt;p&gt;I&#039;m comparing it with no. stored in .txt file, for that i used IF loop but still it not comparing&lt;br /&gt;
two nos.&lt;/p&gt;

&lt;p&gt;Here is code....&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
......&lt;br /&gt;
........&lt;br /&gt;
..........&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/cpmpare-sms-sender-no-no-stored-txt-file#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Wed, 19 Sep 2007 11:40:01 +0200</pubDate>
 <dc:creator>iworktech_sameer</dc:creator>
 <guid isPermaLink="false">19015 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
