<?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>MQX Software Solutions中的主题 Re: How to print a float variable?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196287#M4070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to add the file mqx\source\fio\io_fp.c to the psp project as well (it should have been there).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jul 2009 20:17:27 GMT</pubDate>
    <dc:creator>EAI</dc:creator>
    <dc:date>2009-07-03T20:17:27Z</dc:date>
    <item>
      <title>How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196283#M4066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;In my program I want print or save in file some variables.&lt;/P&gt;&lt;P&gt;When I program this above,it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float i=1.234;&lt;/P&gt;&lt;P&gt;printf ("Variable= %f", i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I need to program this:&lt;/P&gt;&lt;P&gt;float i=1.234;&lt;/P&gt;&lt;P&gt;int j;&lt;/P&gt;&lt;P&gt;i=1.234*1000;&lt;/P&gt;&lt;P&gt;j=i/1000;&lt;/P&gt;&lt;P&gt;i=i-(j*1000); &amp;nbsp; //the operator % does not work.&lt;/P&gt;&lt;P&gt;printf ("Variable= %d.%d",j,i); //It work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This situation occurs in printf and sprintf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can solve it?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 17:14:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196283#M4066</guid>
      <dc:creator>d_vara</dc:creator>
      <dc:date>2009-07-03T17:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196284#M4067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer to page 128 of the MQX User's manual.&lt;/P&gt;&lt;P&gt;Add:&lt;/P&gt;&lt;P&gt;#define MQX_INCLUDE_FLOATING_POINT_IO 1&lt;/P&gt;&lt;P&gt;to user_config.h (make sure you add it to the correct file in the config directory, not in the lib directory).&lt;/P&gt;&lt;P&gt;Rebuild the PSP library. then rebuild the application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: This will require additional stack space for the tasks calling printf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 19:37:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196284#M4067</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-07-03T19:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196285#M4068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,Monday I will probe it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 19:47:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196285#M4068</guid>
      <dc:creator>d_vara</dc:creator>
      <dc:date>2009-07-03T19:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196286#M4069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just to probe it.&lt;/P&gt;&lt;P&gt;I rebuild all libreries.&lt;/P&gt;&lt;P&gt;But when I recompile hvac_demoEVB for 52259, I can read thetwo next errors:&lt;/P&gt;&lt;P&gt;undefined _io_dtoe&lt;/P&gt;&lt;P&gt;undefined _io_dtof&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;both referenced from "io_do_print"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 20:07:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196286#M4069</guid>
      <dc:creator>d_vara</dc:creator>
      <dc:date>2009-07-03T20:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196287#M4070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to add the file mqx\source\fio\io_fp.c to the psp project as well (it should have been there).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 20:17:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196287#M4070</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-07-03T20:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a float variable?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196288#M4071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. It is the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use MQX 3.2 with codewarrior 7.1.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I make this changes, and now it is work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 14:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-print-a-float-variable/m-p/196288#M4071</guid>
      <dc:creator>d_vara</dc:creator>
      <dc:date>2009-07-06T14:40:19Z</dc:date>
    </item>
  </channel>
</rss>

