<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: strcmp is not working in KDS in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486773#M5737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kayathri,&lt;/P&gt;&lt;P&gt;can you provide an example of what you are doing?&lt;/P&gt;&lt;P&gt;And: have you included the header already, like with&lt;/P&gt;&lt;P&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2016 08:09:13 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2016-02-25T08:09:13Z</dc:date>
    <item>
      <title>strcmp is not working in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486772#M5736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using KDS3.0 without Processor Expert and SDK in K22 family.&lt;/P&gt;&lt;P&gt;In this strcmp is not returning proper value even source destination strings are same.&lt;/P&gt;&lt;P&gt;What is the problem?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kayathri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 08:01:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486772#M5736</guid>
      <dc:creator>kayathrim</dc:creator>
      <dc:date>2016-02-25T08:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: strcmp is not working in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486773#M5737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kayathri,&lt;/P&gt;&lt;P&gt;can you provide an example of what you are doing?&lt;/P&gt;&lt;P&gt;And: have you included the header already, like with&lt;/P&gt;&lt;P&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 08:09:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486773#M5737</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-02-25T08:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: strcmp is not working in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486774#M5738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;i have included&amp;nbsp; &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;below are my function&lt;/P&gt;&lt;P&gt;//strcmp test&lt;/P&gt;&lt;P&gt;char f_check[256];&lt;/P&gt;&lt;P&gt;char buf_data[256];&lt;/P&gt;&lt;P&gt;&amp;nbsp; int true1=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int false1=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int i = 5; //assigned simply to chech the strcmp return value&lt;/P&gt;&lt;P&gt;&amp;nbsp; char f_check[256];&lt;/P&gt;&lt;P&gt;&amp;nbsp; memset(f_check,0x41,sizeof(f_check));&lt;/P&gt;&lt;P&gt;&amp;nbsp; memset(buf_data,0x41,sizeof(buf_data));&lt;/P&gt;&lt;P&gt;// &lt;STRONG&gt;upto here i vaue is 5 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = strcmp(f_check,buf_data);&lt;/P&gt;&lt;P&gt;// &lt;STRONG&gt;now i =5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(i==0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; true1++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;control comes here&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt; false1++;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kayathri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 08:33:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486774#M5738</guid>
      <dc:creator>kayathrim</dc:creator>
      <dc:date>2016-02-25T08:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: strcmp is not working in KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486775#M5739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kayathri,&lt;/P&gt;&lt;P&gt;you have a few problems (or bugs, actually) in your code:&lt;/P&gt;&lt;P&gt;- you are using three large arrays (3x256 bytes) local to your function. If you have not allocated enough stack, this will be a problem.&lt;/P&gt;&lt;P&gt;- you are defining f_check[] twice.&lt;/P&gt;&lt;P&gt;- but the real problem is: strcmp() compares the strings up to a zero terminating byte. You don't have that as you initialize the buffers with a pattern, but you don't set the terminating character. I suggest you either fix that, or you are using strncmp() instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes the problem clear and helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 09:32:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/strcmp-is-not-working-in-KDS/m-p/486775#M5739</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-02-25T09:32:40Z</dc:date>
    </item>
  </channel>
</rss>

