<?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 IF statement Oddity (seems to me) in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200032#M5376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a completed a couple of projects written in C, and I've come across something that&lt;/P&gt;&lt;P&gt;seems to be a bit strange to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure that it's probably something simple, but here goes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I would like to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;unsigned char data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;&amp;nbsp; if (data == 0x0b){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inhibit = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pretty simple.&amp;nbsp; If a location called 'data' is = to $0b, then make inhibit 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't &amp;lt;always&amp;gt; work.&amp;nbsp;&amp;nbsp;I usually end up doing &lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;!=&lt;/SPAN&gt;, then&amp;nbsp;changing the&lt;/P&gt;&lt;P&gt;structure of the way the routine works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen this on the JM60 &amp;amp; QG8 versions of CW.&amp;nbsp; I'm using 6.1 currently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2009 10:02:21 GMT</pubDate>
    <dc:creator>UtopiaTim</dc:creator>
    <dc:date>2009-07-17T10:02:21Z</dc:date>
    <item>
      <title>IF statement Oddity (seems to me)</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200032#M5376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a completed a couple of projects written in C, and I've come across something that&lt;/P&gt;&lt;P&gt;seems to be a bit strange to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure that it's probably something simple, but here goes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I would like to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;unsigned char data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;&amp;nbsp; if (data == 0x0b){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inhibit = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pretty simple.&amp;nbsp; If a location called 'data' is = to $0b, then make inhibit 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't &amp;lt;always&amp;gt; work.&amp;nbsp;&amp;nbsp;I usually end up doing &lt;SPAN style="color: #0000ff; font-family: 'courier new,courier';"&gt;!=&lt;/SPAN&gt;, then&amp;nbsp;changing the&lt;/P&gt;&lt;P&gt;structure of the way the routine works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen this on the JM60 &amp;amp; QG8 versions of CW.&amp;nbsp; I'm using 6.1 currently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 10:02:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200032#M5376</guid>
      <dc:creator>UtopiaTim</dc:creator>
      <dc:date>2009-07-17T10:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement Oddity (seems to me)</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200033#M5377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not say whether &lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;data&lt;/EM&gt;&lt;/FONT&gt; is a local variable or a global variable.&amp;nbsp; If a global variable, can the variable be written via an ISR?&amp;nbsp; If so, the variable definition should include the &lt;EM&gt;volatile&lt;/EM&gt; modifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 10:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200033#M5377</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-07-17T10:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement Oddity (seems to me)</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200034#M5378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, I'm writing the code&amp;nbsp;as a single module, and there are&lt;/P&gt;&lt;P&gt;no interrupts.&amp;nbsp; (it's a very simple project).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 10:40:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/IF-statement-Oddity-seems-to-me/m-p/200034#M5378</guid>
      <dc:creator>UtopiaTim</dc:creator>
      <dc:date>2009-07-17T10:40:48Z</dc:date>
    </item>
  </channel>
</rss>

