<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'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </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'> </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. 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> </span></font></p>
</div>
</body>
</html>