<?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: Problems with printf in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189153#M4720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;ISO C states that hexadecimal escape sequences are only terminated by a non-hexadecimal number. This is idiotic, but it is the standard.&lt;BR /&gt;&lt;BR /&gt;The solution is to trick the IDE into ending the escape sequence for you:&lt;BR /&gt;&lt;BR /&gt;printf("200 %4.1f\xD2" "C", ...);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As long as there is a space between the D2" and the "C" you shouldn't receive any warnings.&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Lundin on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-11&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;03:40 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jun 2009 20:39:09 GMT</pubDate>
    <dc:creator>Lundin</dc:creator>
    <dc:date>2009-06-11T20:39:09Z</dc:date>
    <item>
      <title>Problems with printf</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189151#M4718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;I need to print in a LCD this text "200 %4.1f\xD2C" but \xD2C give error. \xD2 is the grad simbol and C for Centigrad. CW meens that \xD2C is an hex number and get error. If I print "\xD2 C" solve the problem, but I must eliminate de space caracter. I have tested with "\xD2""C" but that get "concatenation worning" and compile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can any solve this problem ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jorge Migiel Dhios&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 17:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189151#M4718</guid>
      <dc:creator>BairesRobotics</dc:creator>
      <dc:date>2009-06-10T17:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with printf</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189152#M4719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yes, there's a problem with \x&amp;lt;hex number&amp;gt;. I don't remember explanation why there's a problem with \x, but using octal number (\322 in your case) should always work. You just need to always specify 3 octal digits after \, for example "\000", "\001", "\002\010" etc.&amp;nbsp;"200 %4.1f\322C" should work properly&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by kef on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-10&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;01:29 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 17:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189152#M4719</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2009-06-10T17:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with printf</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189153#M4720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;ISO C states that hexadecimal escape sequences are only terminated by a non-hexadecimal number. This is idiotic, but it is the standard.&lt;BR /&gt;&lt;BR /&gt;The solution is to trick the IDE into ending the escape sequence for you:&lt;BR /&gt;&lt;BR /&gt;printf("200 %4.1f\xD2" "C", ...);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As long as there is a space between the D2" and the "C" you shouldn't receive any warnings.&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Lundin on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-11&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;03:40 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2009 20:39:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189153#M4720</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2009-06-11T20:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with printf</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189154#M4721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick and (very) ugly solutions:&lt;/P&gt;&lt;P&gt;- use two printf's without \n or other esc chars between;&lt;/P&gt;&lt;P&gt;- strcpy the entire output msg in a string and print it out;&lt;/P&gt;&lt;P&gt;- strcpy just the \xD2C as it gets into a string...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't ask about optimizations on size and speed... &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 17:01:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problems-with-printf/m-p/189154#M4721</guid>
      <dc:creator>Reky</dc:creator>
      <dc:date>2009-06-16T17:01:23Z</dc:date>
    </item>
  </channel>
</rss>

