Xref: utzoo comp.lang.c:8016 comp.sys.m6809:709 Path: utzoo!mnetor!uunet!ncc!alberta!att-ih!ihnp4!ihwpt!knudsen From: knudsen@ihwpt.ATT.COM (mike knudsen) Newsgroups: comp.lang.c,comp.sys.m6809 Subject: Re: Don't use Scanf() Message-ID: <2428@ihwpt.ATT.COM> Date: 11 Mar 88 23:06:14 GMT References: <2401@ihwpt.ATT.COM> <320@c10sd1.StPaul.NCR.COM> <1185@ucsfcca.ucsf.edu> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 17 Keywords: C, I/O, library, code size Good points. But if you already are using printf() in your program (with a legitimate need for the formatting) in several places, then substituting puts() where possible will make your program object file bigger, not smaller, since now the puts() code has to be linked in too. Puts() and putchar() will be a little faster, but when you're talking to humans who cares? BTW, I once wrote a large interactive monitor for a free-standing 8086 board, using a C that had no I/O at all. I wrote routines to output %2x, %4x, and %5d as well as strings. Took a lot of calls to do one good printf(), but it IS possible and such custom I/O may save you bytes. -- Mike J Knudsen ...ihnp4!ihwpt!knudsen Bell Labs(AT&T) Delphi: RAGTIMER CIS: "Just say NO to MS-DOS!" "OS/2 == 1/2 of an OS"