[comp.sys.m6809] Re^2: Don't use Scanf

kimcm@ambush.UUCP (Kim Chr. Madsen) (03/14/88)

In article <1185@ucsfcca.ucsf.edu> rk9005@cca.ucsf.edu (Roland McGrath) writes:
>One real stupidity I've seen many, many times is the
>over-use of printf.  The printf functions have their uses,
>and they do their job quite well, but please know what these
>uses are!!

Well, printf has its uses and does them remarkably well - in fact so
well that almost every program does at least have one printf
statement! As others claimed inclusion of code for puts and putchar et
al will only make the code larger and possibly slower to execute, I
will take a different approach in defending the usage of printf...

The printf statement is one of the most universal I/O routines in the
C language which can output in almost any way you like - this gives
you the opportunity to nearly always stick to the same output routine,
thus keeping your code more readable to others (and non-C-programmers). 
If you clutter up your code with too many output routines your code
will be less understandable and more prone to be bug filled.

I have nothing against non-printf output routines and uses them where
appropiate, but I do not often mix them altogether in one piece of
code. 


					Best Regards
					Kim Chr. Madsen.