<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Paul Mateer<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, July 03, 2008 4:25
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Discussion list for ICCAVR and
ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member
of this.<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Icc-avr] sprintf
limitation?</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I'm running into a strange problem.&nbsp; Trying to
adjust my var. &quot;max_flow&quot; from 0-99999.&nbsp; This sort of
works....but only up to 39999!!!&nbsp; Anything 40000 and above it returns me
an &quot;atof error - number to big&quot; .&nbsp; Why?&nbsp; According to
STDLIB.H max is 2147483520.&nbsp; Ideas???<br>
<br>
//-----------------------------------------------------------------------<br>
&nbsp;&nbsp; double max_flow;<br>
&nbsp;&nbsp; unsigned long temp;<br>
&nbsp;&nbsp; char VAL[15];&nbsp;&nbsp; <br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; max_flow = 39999;&nbsp; <br>
<br>
&nbsp;&nbsp; temp = (unsigned long)max_flow;<br>
&nbsp;&nbsp; csprintf(VAL,&quot;%05ld&quot;,temp);<br>
<br>
&nbsp;&nbsp; dspsingle(0, 'M');<br>
&nbsp;&nbsp; dspsingle(1, 'X');<br>
&nbsp;&nbsp; dspsingle(2, '=');<br>
&nbsp;&nbsp; dspsingle(3, VAL[0]);<br>
&nbsp;&nbsp; dspsingle(4, VAL[1]);<br>
&nbsp;&nbsp; dspsingle(5, VAL[2]);<br>
&nbsp;&nbsp; dspsingle(6, VAL[3]);<br>
&nbsp;&nbsp; dspsingle(7, VAL[4]);<br>
<br>
&nbsp;&nbsp; VAL[0]= (adj_digit((VAL[0]-48), 3)) + 48;<br>
&nbsp;&nbsp; wait_key();<br>
&nbsp;&nbsp; VAL[1]= (adj_digit((VAL[1]-48), 4)) + 48;<br>
&nbsp;&nbsp; wait_key();<br>
&nbsp;&nbsp; VAL[2]= (adj_digit((VAL[2]-48), 5)) + 48;<br>
&nbsp;&nbsp; wait_key();<br>
&nbsp;&nbsp; VAL[3]= (adj_digit((VAL[3]-48), 6)) + 48;<br>
&nbsp;&nbsp; wait_key();<br>
&nbsp;&nbsp; VAL[4]= (adj_digit((VAL[4]-48), 7)) + 48;<br>
<br>
&nbsp;&nbsp; a = (VAL[0] - 48) * 10000;<br>
&nbsp;&nbsp; b = (VAL[1] - 48) * 1000;<br>
&nbsp;&nbsp; c = (VAL[2] - 48) * 100;<br>
&nbsp;&nbsp; d = (VAL[3] - 48) * 10;<br>
&nbsp;&nbsp; e = (VAL[4] - 48);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp; temp = a+b+c+d+e;<br>
&nbsp;&nbsp; max_flow = temp;<br>
//----------------------------------------------------------------------------------------<br
clear=all>
<br>
-- <br>
Paul Mateer, AA9GG<br>
Elan Engineering Corp.<br>
<a href="http://www.elanengr.com">www.elanengr.com</a> </span></font></p>

</div>

</body>

</html>