Hmmmm.....<br>I&#39;ve been using this format for years now with no problems!&nbsp; I did try it with the format string, of course it worked too but added 4 bytes to my code.&nbsp; typically I do something like this:<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; csprintf(DATA,&quot;%#4.1f GPM&quot;,PULSE_FLOW);<br>
<br><br><br><div class="gmail_quote">On Wed, May 7, 2008 at 2:42 PM, John Baraclough &lt;<a href="mailto:j_baraclough@zetnet.co.uk">j_baraclough@zetnet.co.uk</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In the &#39;printf()&#39; library function which lies underneath &#39;csprintf()&#39; a format string is mandatory and therefore you must use:<div class="Ih2E3d"><br>
<br>
csprintf(DATA, &quot;%S&quot;, &quot; H2O Flo&quot;);<br>
<br></div>
Personally I would also remove the inline string by declaring it in a header file:<br>
<br>
_flash WaterFlowString = &quot; H2O Flo&quot;;<br>
<br>
and then using:<br>
<br>
csprintf(DATA, &quot;%S&quot;, WaterFlowString);<br>
<br>
in the code file.<br>
<br>
HTH.<br>
<br>
All the best for now,<br>
John<br>
<br>
<br>
Paul Mateer wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="Ih2E3d">
So which is correct (better?) between these two?<br>
<br></div><div><div></div><div class="Wj3C7c">
On Wed, May 7, 2008 at 1:44 PM, John Baraclough &lt;<a href="mailto:j_baraclough@zetnet.co.uk" target="_blank">j_baraclough@zetnet.co.uk</a> &lt;mailto:<a href="mailto:j_baraclough@zetnet.co.uk" target="_blank">j_baraclough@zetnet.co.uk</a>&gt;&gt; wrote:<br>

<br>
 &nbsp; &nbsp;John Woods wrote:<br>
<br>
 &nbsp; &nbsp;Paul Mateer wrote:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;csprintf(DATA,&quot; H2O Flo&quot;);<br>
<br>
<br>
 &nbsp; &nbsp;*This is the best method. Firstly you need to decide the maximum<br>
 &nbsp; &nbsp;length of string that you want to store, then add one byte for the<br>
 &nbsp; &nbsp;terminating NULL. Finally you should use:<br>
<br>
<br>
 &nbsp; &nbsp;csprintf(DATA, &quot;%S&quot;, &quot; H2O Flo&quot;);<br>
<br>
 &nbsp; &nbsp;but be careful to note that you MUST use upper case &#39;S%&#39; to<br>
 &nbsp; &nbsp;indicate that the string is in Flash only.<br>
<br>
<br>
<br>
 &nbsp; &nbsp;*Gerhard at AMS wrote:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Hi All,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;This is rather a stupid question..... (I am even embarresed to<br>
 &nbsp; &nbsp; &nbsp; &nbsp;ask this, instead of RTFM!!)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; I wish to declare a &nbsp;String Variable : &nbsp;StrName = (String of<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Char); &nbsp;Then I wish to somewhere in my prgm state &gt; &nbsp;StrName =<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&quot;Hello World&quot;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; I know you buffs know the &#39;how-to&#39; &nbsp;by heart........<br>
 &nbsp; &nbsp; &nbsp; &nbsp; Please advise the of the correct &#39; how-to declare a string<br>
 &nbsp; &nbsp; &nbsp; &nbsp;and use of &#39; for the above?<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Your help is appreciated<br>
 &nbsp; &nbsp; &nbsp; &nbsp; Thanks,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Gerhard<br>
 &nbsp; &nbsp; &nbsp; &nbsp; <br>
<br>
 &nbsp; &nbsp;*HTH<br>
<br>
 &nbsp; &nbsp;John<br>
<br>
<br>
 &nbsp; &nbsp;*<br>
<br>
 &nbsp; &nbsp;_______________________________________________<br>
 &nbsp; &nbsp;Icc-avr mailing list<br></div></div>
 &nbsp; &nbsp;<a href="mailto:Icc-avr@imagecraft.com" target="_blank">Icc-avr@imagecraft.com</a> &lt;mailto:<a href="mailto:Icc-avr@imagecraft.com" target="_blank">Icc-avr@imagecraft.com</a>&gt;<div class="Ih2E3d"><br>
 &nbsp; &nbsp;<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" target="_blank">http://dragonsgate.net/mailman/listinfo/icc-avr</a><br>
<br>
<br>
<br>
<br>
-- <br>
Paul Mateer, AA9GG<br>
Elan Engineering Corp.<br>
</div><a href="http://www.elanengr.com" target="_blank">www.elanengr.com</a> &lt;<a href="http://www.elanengr.com" target="_blank">http://www.elanengr.com</a>&gt;<br>
------------------------------------------------------------------------<div class="Ih2E3d"><br>
<br>
_______________________________________________<br>
Icc-avr mailing list<br>
<a href="mailto:Icc-avr@imagecraft.com" target="_blank">Icc-avr@imagecraft.com</a><br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" target="_blank">http://dragonsgate.net/mailman/listinfo/icc-avr</a><br>
 &nbsp;<br>
</div></blockquote><div><div></div><div class="Wj3C7c">
<br>
_______________________________________________<br>
Icc-avr mailing list<br>
<a href="mailto:Icc-avr@imagecraft.com" target="_blank">Icc-avr@imagecraft.com</a><br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" target="_blank">http://dragonsgate.net/mailman/listinfo/icc-avr</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Paul Mateer, AA9GG<br>Elan Engineering Corp.<br><a href="http://www.elanengr.com">www.elanengr.com</a>