<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EpostStil17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=NO-BOK link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> Paul<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Try</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> to </span><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>declare</span><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>max_flow
as an unsigned long or max_flow = (double)temp;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Svenn </span><span style='font-size:11.0pt;font-family:Wingdings;
color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Fra:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] <b>På
vegne av</b> Paul Mateer<br>
<b>Sendt:</b> 3. juli 2008 16:25<br>
<b>Til:</b> Discussion list for ICCAVR and ICCtiny Users. You do NOT need to
subscribe to icc-announce if you are a member of this.<br>
<b>Emne:</b> [Icc-avr] sprintf limitation?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>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> <o:p></o:p></p>

</div>

</body>

</html>