<?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: Itoa conversion in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536249#M4976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ex-kayoda on Sun May 27 06:46:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[COLOR=Red] char temperature_string[33];[/COLOR]&amp;nbsp;&amp;nbsp;&amp;nbsp; //recommended string length&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;That's worst case (=base 2) string length :rolleyes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For bases &amp;gt;=10 string length can be reduced to 12 :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; = optional -sign (1)&amp;nbsp; +&amp;nbsp; 32bit decimal value digits (10) + null-termination (1)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:22:17 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:22:17Z</dc:date>
    <item>
      <title>Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536247#M4974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cesimkaol on Sun May 27 04:32:59 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you Zero , it works , you are the best...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536247#M4974</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536248#M4975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun May 27 04:57:47 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You are trying to store the ASCII string of an integer in 1 pointer to char :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nice compression trick, but unfortunately not working :rolleyes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So use an array of &amp;gt;32 chars as mentioned in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://support.code-red-tech.com/CodeRedWiki/redlib_itoa&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
float temperature = 1234.56;&amp;nbsp;&amp;nbsp;&amp;nbsp; //melting iron
[COLOR=Red]char temperature_string[33];[/COLOR]&amp;nbsp;&amp;nbsp;&amp;nbsp; //recommended string length

int main(void)
{
 volatile static int i = 0 ;
 while(1)
 {
&amp;nbsp; i++ ;
&amp;nbsp; itoa((int)(temperature*100),&amp;amp;temperature_string[0],10);//convert with decimals
 }
 return 0 ;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536248#M4975</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536249#M4976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ex-kayoda on Sun May 27 06:46:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[COLOR=Red] char temperature_string[33];[/COLOR]&amp;nbsp;&amp;nbsp;&amp;nbsp; //recommended string length&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;That's worst case (=base 2) string length :rolleyes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For bases &amp;gt;=10 string length can be reduced to 12 :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; = optional -sign (1)&amp;nbsp; +&amp;nbsp; 32bit decimal value digits (10) + null-termination (1)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536249#M4976</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536250#M4977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frame on Sun May 27 10:59:46 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;That's not uC or RedLib specific, it plain C language - the difference between an aggregated data type, and a reference to it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536250#M4977</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536251#M4978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun May 27 11:41:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, pointer cluelessness is no Code Red invention :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536251#M4978</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Itoa conversion</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536252#M4979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cesimkaol on Mon May 28 09:11:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you Zero , you are the best.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:22:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Itoa-conversion/m-p/536252#M4979</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:22:20Z</dc:date>
    </item>
  </channel>
</rss>

