<?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: C Language main() in S32K</title>
    <link>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1547350#M18628</link>
    <description>Thank you for your timely reply. I want to know why I will return - 1 error. Generally, 0 should not be returned if there is no error</description>
    <pubDate>Wed, 02 Nov 2022 03:15:31 GMT</pubDate>
    <dc:creator>QJ_HAPPY</dc:creator>
    <dc:date>2022-11-02T03:15:31Z</dc:date>
    <item>
      <title>C Language main()</title>
      <link>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1522598#M17718</link>
      <description>&lt;P&gt;Why is the endless loop in the main function is ：&lt;/P&gt;&lt;P&gt;for (;;)&lt;BR /&gt;{&lt;BR /&gt;if (exit_code != 0)&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;return exit_code;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;What causes exit_code = -1？&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 06:10:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1522598#M17718</guid>
      <dc:creator>QJ_HAPPY</dc:creator>
      <dc:date>2022-09-15T06:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: C Language main()</title>
      <link>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1523148#M17735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/197531"&gt;@QJ_HAPPY&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code that you get from the main function is just a template. That you can use or not.&lt;/P&gt;
&lt;P&gt;Normally, you want the software of an embedded system to execute constantly and so, an infinite loop can help you there.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Returning different values that 0 like, return 1 or return -1 can mean that function finished&amp;nbsp;&lt;/SPAN&gt;returning error&lt;STRONG&gt;. &lt;/STRONG&gt;But this is not mandatory and it's just a way to evaluate the execution of a function. Anyway you can give it the meaning you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards and Happy Coding!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 20:30:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1523148#M17735</guid>
      <dc:creator>JRoberto</dc:creator>
      <dc:date>2022-09-15T20:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: C Language main()</title>
      <link>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1547350#M18628</link>
      <description>Thank you for your timely reply. I want to know why I will return - 1 error. Generally, 0 should not be returned if there is no error</description>
      <pubDate>Wed, 02 Nov 2022 03:15:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/C-Language-main/m-p/1547350#M18628</guid>
      <dc:creator>QJ_HAPPY</dc:creator>
      <dc:date>2022-11-02T03:15:31Z</dc:date>
    </item>
  </channel>
</rss>

