code:rprintf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
code:rprintf [2008/11/04 00:05] – laurenceb | code:rprintf [2008/11/06 01:59] (current) – laurenceb | ||
---|---|---|---|
Line 7: | Line 7: | ||
{ | { | ||
unsigned char firstplace = FALSE; | unsigned char firstplace = FALSE; | ||
- | unsigned char i=255, digit; | + | unsigned char i=25, digit; |
double place = 1000000000000000.0; | double place = 1000000000000000.0; | ||
Line 20: | Line 20: | ||
if(digit | firstplace) // | if(digit | firstplace) // | ||
{ | { | ||
- | firstplace = TRUE; //we have reached the first digit | + | firstplace = TRUE; //we have reached the first digit |
rprintfChar(digit+0x30); | rprintfChar(digit+0x30); | ||
} | } | ||
Line 29: | Line 29: | ||
rprintfChar(' | rprintfChar(' | ||
firstplace = TRUE; //we have to print after the decimal place | firstplace = TRUE; //we have to print after the decimal place | ||
- | i=numDigits; | + | i=numDigits+1; |
} | } | ||
x-=digit*place; | x-=digit*place; |
code/rprintf.1225757139.txt.gz · Last modified: 2008/11/04 00:05 by laurenceb