<?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>CodeWarrior Development Tools中的主题 Declaring variables inside the for loop statement</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Declaring-variables-inside-the-for-loop-statement/m-p/311105#M848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;DEar CW,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Declaring variables inside the for loop statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;for(uint8_t Chr = 0; Chr &amp;lt; ITEM_TEXT_LENGTH; Chr++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Versus not:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;uint8_t Chr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;for(Chr = 0; Chr &amp;lt; ITEM_TEXT_LENGTH; Chr++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Declaring variables inside the for loop statement throws this error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;‘for’ loop initial declarations are only allowed in C99 mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #1f497d;"&gt;It certainly isn’t a problem to move the declarations outside of the for loop, but I’d like to have the option of using C99 or know where it is. Do you&amp;nbsp; know if there is a checkbox or command line switch for GCC somewhere?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;hy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 15:53:15 GMT</pubDate>
    <dc:creator>HeMyFAE</dc:creator>
    <dc:date>2014-04-04T15:53:15Z</dc:date>
    <item>
      <title>Declaring variables inside the for loop statement</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Declaring-variables-inside-the-for-loop-statement/m-p/311105#M848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;DEar CW,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Declaring variables inside the for loop statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;for(uint8_t Chr = 0; Chr &amp;lt; ITEM_TEXT_LENGTH; Chr++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Versus not:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;uint8_t Chr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;for(Chr = 0; Chr &amp;lt; ITEM_TEXT_LENGTH; Chr++)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Declaring variables inside the for loop statement throws this error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: #1f497d;"&gt;‘for’ loop initial declarations are only allowed in C99 mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #1f497d;"&gt;It certainly isn’t a problem to move the declarations outside of the for loop, but I’d like to have the option of using C99 or know where it is. Do you&amp;nbsp; know if there is a checkbox or command line switch for GCC somewhere?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;hy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:53:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Declaring-variables-inside-the-for-loop-statement/m-p/311105#M848</guid>
      <dc:creator>HeMyFAE</dc:creator>
      <dc:date>2014-04-04T15:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring variables inside the for loop statement</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Declaring-variables-inside-the-for-loop-statement/m-p/311106#M849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right-click on project | Properties | C/C++ Build | Settings | Tool Settings tab | ARM Ltd Windows GCC Compiler | Miscellaneous | Language Standard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 17:15:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Declaring-variables-inside-the-for-loop-statement/m-p/311106#M849</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-04-04T17:15:17Z</dc:date>
    </item>
  </channel>
</rss>

