Undelivered mail

MAILER%ALASKA.BITNET at CUNYVM.CUNY.EDU MAILER%ALASKA.BITNET at CUNYVM.CUNY.EDU
Sat Mar 12 21:58:15 AEST 1988


Subject:  Re: Don't use Scanf()

[Non-Deliverable:  User does not exist or has never logged on]

Reply-To: Info-C at BRL.ARPA

Received: From UWAVM(MAILER) by ALASKA with Jnet id 7456
          for SXJVK at ALASKA; Sat, 12 Mar 88 02:39 AST
Received: by UWAVM (Mailer X1.25) id 5085; Sat, 12 Mar 88 03:39:04 PST
Date:         Fri, 11 Mar 88 23:06:14 GMT
Reply-To:     Info-C at BRL.ARPA
Sender:       Info-C List <INFO-C at NDSUVM1>
From:         mike knudsen <knudsen at ihwpt.ATT.COM>
Subject:      Re: Don't use Scanf()
Comments: To: info-c at BRL-SMOKE.arpa
To:           Vic Kapella <SXJVK at ALASKA>

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: <memory failure, too many digits>
    "Just say NO to MS-DOS!"    "OS/2 == 1/2 of an OS"



More information about the Comp.lang.c mailing list