<?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>Classic/Legacy CodeWarriorのトピックRe: Convert String to an Integer</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135213#M802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi mjbcswitzerland!&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;mudy&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2006 17:07:32 GMT</pubDate>
    <dc:creator>mudy</dc:creator>
    <dc:date>2006-11-08T17:07:32Z</dc:date>
    <item>
      <title>Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135208#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I was wondering how one would convert a string to an integer.&amp;nbsp; I see that it doesn't seem codewarrior supports the atoi command.&amp;nbsp; Thanks in advance.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 01:45:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135208#M797</guid>
      <dc:creator>RoboMan</dc:creator>
      <dc:date>2006-11-03T01:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135209#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;I don't know if CW has it, but you can code it yourself. It is very simple. Look at this: &lt;A href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/atoi.c" target="test_blank"&gt;http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/atoi.c&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 21:27:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135209#M798</guid>
      <dc:creator>pittbull</dc:creator>
      <dc:date>2006-11-03T21:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135210#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;If the string represents an hex number you can use this code:&lt;PRE&gt;unsigned int atoin(char s[])
{
int i;
unsigned int n;
n = 0;
i=0;

while(s[i]!='\0'){
//for (i = 0; s[i]!='\0'; i++){

if ((s[i] &amp;gt;= '0') &amp;amp;&amp;amp; (s[i]  (minor)= '9')){
   n = (16 * n) +(s[i] - '0');}
else{
   n = (16 * n) +(s[i] - 'A' + 10);}
  
i++;
}
return n;
}&lt;/PRE&gt;mudy&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 22:45:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135210#M799</guid>
      <dc:creator>mudy</dc:creator>
      <dc:date>2006-11-03T22:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135211#M800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the code.&amp;nbsp; I did find codewarrior has an atoi function, i had just used it incorrectly the first time.&amp;nbsp; Thanks again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Josh&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Nov 2006 01:45:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135211#M800</guid>
      <dc:creator>RoboMan</dc:creator>
      <dc:date>2006-11-04T01:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135212#M801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mudy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code requires HEX ASCII string to be coded with capitals.&lt;BR /&gt;There is a simple trick to make it case independent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the character is not between '0' and '9' try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n = (16 * n) + ((s[i] - ('a' - '9' - 1)) &amp;amp; 0x0f);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark Butcher&lt;BR /&gt;&lt;A href="http://www.mjbc.ch/"&gt;www.mjbc.ch&lt;/A&gt; / &lt;A href="http://www.uTasker.com/"&gt;www.uTasker.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 03:23:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135212#M801</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2006-11-07T03:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to an Integer</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135213#M802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi mjbcswitzerland!&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;mudy&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 17:07:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Convert-String-to-an-Integer/m-p/135213#M802</guid>
      <dc:creator>mudy</dc:creator>
      <dc:date>2006-11-08T17:07:32Z</dc:date>
    </item>
  </channel>
</rss>

