this is how printf works
i wrote my own verison of printf and wanted to show off
the first param is a function to print a null terminated string Code:
|
Horrible.
P.S.: Constructivecriticism is my middle name. |
Quote:
it would be if you say what is horrable |
Quote:
... Whatever you write, if you have constants like 9, 10, 16, etc. instead of meaningful macro names, your code is bad. The allowed constants are 0 (like you are starting from the number zero element in an array) and +1, -1 - like 'idx = idx + 1;' - meaning next index/value in an array. And because of ++, -- in "C" one rarely needs +1, -1. Sometimes 2, 3 - like each second or each third element, but 3 is already suspicious. |
Quote:
|
Quote:
Code:
#define D_RADIX ((unsigned)10) /* for %d conversions */ |
All times are GMT -5. The time now is 01:58 PM. |