code:rprintf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
code:rprintf [2008/11/03 21:12] – 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; | + | firstplace = TRUE; |
rprintfChar(digit+0x30); | rprintfChar(digit+0x30); | ||
- | if(place == 1.0) | + | } |
- | { | + | if(place == 1.0) |
- | rprintfChar(' | + | { |
- | i=numDigits; | + | if(!firstplace) |
- | } | + | rprintfChar(' |
+ | rprintfChar(' | ||
+ | firstplace | ||
+ | i=numDigits+1; | ||
} | } | ||
x-=digit*place; | x-=digit*place; |
code/rprintf.1225746729.txt.gz · Last modified: 2008/11/03 21:12 by laurenceb