<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> </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> </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> </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> </o:p></p>
<p class=MsoNormal>I'm running into a strange problem. Trying to adjust
my var. "max_flow" from 0-99999. This sort of works....but only
up to 39999!!! Anything 40000 and above it returns me an "atof error
- number to big" . Why? According to STDLIB.H max is
2147483520. Ideas???<br>
<br>
//-----------------------------------------------------------------------<br>
double max_flow;<br>
unsigned long temp;<br>
char VAL[15]; <br>
<br>
max_flow = 39999; <br>
<br>
temp = (unsigned long)max_flow;<br>
csprintf(VAL,"%05ld",temp);<br>
<br>
dspsingle(0, 'M');<br>
dspsingle(1, 'X');<br>
dspsingle(2, '=');<br>
dspsingle(3, VAL[0]);<br>
dspsingle(4, VAL[1]);<br>
dspsingle(5, VAL[2]);<br>
dspsingle(6, VAL[3]);<br>
dspsingle(7, VAL[4]);<br>
<br>
VAL[0]= (adj_digit((VAL[0]-48), 3)) + 48;<br>
wait_key();<br>
VAL[1]= (adj_digit((VAL[1]-48), 4)) + 48;<br>
wait_key();<br>
VAL[2]= (adj_digit((VAL[2]-48), 5)) + 48;<br>
wait_key();<br>
VAL[3]= (adj_digit((VAL[3]-48), 6)) + 48;<br>
wait_key();<br>
VAL[4]= (adj_digit((VAL[4]-48), 7)) + 48;<br>
<br>
a = (VAL[0] - 48) * 10000;<br>
b = (VAL[1] - 48) * 1000;<br>
c = (VAL[2] - 48) * 100;<br>
d = (VAL[3] - 48) * 10;<br>
e = (VAL[4] - 48);<br>
<br>
temp = a+b+c+d+e;<br>
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>